File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ libcups v3.0.0 (YYYY-MM-DD)
99- Fixed return values of ` ippDateToTime ` when the timezone isn't GMT.
1010- Fixed a potential timing issue with ` cupsEnumDests ` .
1111- Fixed a bug in the Avahi implementation of ` cupsDNSSDBrowseNew ` .
12+ - Fixed a memory leak in ` httpClose ` .
1213
1314
1415libcups v3.0rc4 (2025-03-18)
Original file line number Diff line number Diff line change @@ -273,6 +273,9 @@ httpClearFields(http_t *http) // I - HTTP connection
273273void
274274httpClose (http_t * http ) // I - HTTP connection
275275{
276+ http_field_t field ; // Current field
277+
278+
276279 DEBUG_printf ("httpClose(http=%p)" , (void * )http );
277280
278281 // Range check input...
@@ -285,9 +288,12 @@ httpClose(http_t *http) // I - HTTP connection
285288 // Free memory used...
286289 httpAddrFreeList (http -> hostlist );
287290
288- httpClearFields (http );
291+ for (field = HTTP_FIELD_ACCEPT ; field < HTTP_FIELD_MAX ; field ++ )
292+ {
293+ free (http -> default_fields [field ]);
294+ free (http -> fields [field ]);
295+ }
289296
290- free (http -> fields [HTTP_FIELD_HOST ]);
291297 free (http -> authstring );
292298 free (http -> cookie );
293299
You can’t perform that action at this time.
0 commit comments