File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ libcups v3.0.0 (YYYY-MM-DD)
9
9
- Fixed return values of ` ippDateToTime ` when the timezone isn't GMT.
10
10
- Fixed a potential timing issue with ` cupsEnumDests ` .
11
11
- Fixed a bug in the Avahi implementation of ` cupsDNSSDBrowseNew ` .
12
+ - Fixed a memory leak in ` httpClose ` .
12
13
13
14
14
15
libcups 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
273
273
void
274
274
httpClose (http_t * http ) // I - HTTP connection
275
275
{
276
+ http_field_t field ; // Current field
277
+
278
+
276
279
DEBUG_printf ("httpClose(http=%p)" , (void * )http );
277
280
278
281
// Range check input...
@@ -285,9 +288,12 @@ httpClose(http_t *http) // I - HTTP connection
285
288
// Free memory used...
286
289
httpAddrFreeList (http -> hostlist );
287
290
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
+ }
289
296
290
- free (http -> fields [HTTP_FIELD_HOST ]);
291
297
free (http -> authstring );
292
298
free (http -> cookie );
293
299
You can’t perform that action at this time.
0 commit comments