OpenPrinting/cups-filters

MEMORY_LEAK in utils/cups-browsed.c

ellena13 opened this issue · 3 comments

  • Dynamic memory, referenced by buf, is allocated at cups-browsed.c:728:

char *buf = (char*) malloc(sizeof(char)*buffer_size);

by calling function malloc and lost at cups-browsed.c:738.

  • Dynamic memory, referenced by ppdsizename, is allocated at cups-browsed.c:2074 :

ppdsizename = (char *)malloc(sizeof(char) * 128);

by calling function malloc and lost at cups-browsed.c:2081.

  • Dynamic memory, referenced by ppdsizename, is allocated at cups-browsed.c:2753:

ppdsizename = (char *)malloc(sizeof(char) * 128);

by calling function malloc and lost at cups-browsed.c:2758.

The free() operator should be used to free the allocated memory space before the function ends, otherwise there will be a MEMORY_LEAK.

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.

Author E. Bykhanova.

Please run your scanner on the latest cups-filters version - 2.0.0, thank you!