Skip to content

Avoid leaking pixel memory if DUMMYScreenInit fails

Alan Coopersmith requested to merge alanc/xf86-video-dummy:parfait into master

Resolves issues reported by Oracle Parfait static analyzer:

Error: Memory leak
   Memory leak [memory-leak] (CWE 401):
      Memory leak of pointer pixels allocated with malloc((pScrn->videoRam * 1024))
        at line 803 of dummy_driver.c in function 'DUMMYScreenInit'.
          pixels allocated at line 790 with malloc((pScrn->videoRam * 1024))
   Memory leak [memory-leak] (CWE 401):
      Memory leak of pointer pixels allocated with malloc((pScrn->videoRam * 1024))
        at line 805 of dummy_driver.c in function 'DUMMYScreenInit'.
          pixels allocated at line 790 with malloc((pScrn->videoRam * 1024))

Merge request reports

Loading