CUPS-PDF-to-PDF icon indicating copy to clipboard operation
CUPS-PDF-to-PDF copied to clipboard

Handle leak in cups-pdf.c

Open sminux opened this issue 9 months ago • 0 comments

The bug was detected via svace1 static analyzer scanning.

The handle 'fpdest' is created at https://github.com/alexivkin/CUPS-PDF-to-PDF/blob/c14428c2ca8e95371daad7db6d11c84046b1a2d4/cups-pdf.c#L718 by calling function 'fopen' and lost at https://github.com/alexivkin/CUPS-PDF-to-PDF/blob/c14428c2ca8e95371daad7db6d11c84046b1a2d4/cups-pdf.c#L727

Do we need (void) fclose(fpdest); before return?

sminux avatar May 14 '24 12:05 sminux