• Alan Coopersmith's avatar
    nx-X11: Backport: RRModeCreate: plug memory leak of newModes if AddResource fails · e2f5d079
    Alan Coopersmith authored
    Reported by parfait 1.0:
    
    Error: Memory leak (CWE 401)
       Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8))
            at line 93 of randr/rrmode.c in function 'RRModeCreate'.
              pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)).
    Error: Memory leak (CWE 401)
       Memory leak of pointer 'newModes' allocated with malloc(8)
            at line 93 of randr/rrmode.c in function 'RRModeCreate'.
              pointer allocated at line 84 with malloc(8).
    Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: 's avatarKeith Packard <keithp@keithp.com>
    
    Backported from Arctica GH 3.6.x branch.
    
    v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
    v3: backport to nx-libs 3.5.0.x (Mihai Moldovan)
    e2f5d079
Name
Last commit
Last update
debian Loading commit data...
nx-X11 Loading commit data...
nxcomp Loading commit data...
nxcompext Loading commit data...
nxcompshad Loading commit data...
nxproxy Loading commit data...
nx-libs.spec Loading commit data...