| |
@@ -0,0 +1,38 @@
|
| |
+ From d9924186325c89aefa56e36258f56f246dd2c4ad Mon Sep 17 00:00:00 2001
|
| |
+ From: Richard Lescak <rlescak@redhat.com>
|
| |
+ Date: Tue, 11 Jan 2022 10:53:34 +0100
|
| |
+ Subject: [PATCH] cups/http.c,encode.c: Fix memory leaks
|
| |
+
|
| |
+ ---
|
| |
+ CHANGES.md | 3 ++-
|
| |
+ cups/encode.c | 1 +
|
| |
+ cups/http.c | 1 +
|
| |
+ 3 files changed, 4 insertions(+), 1 deletion(-)
|
| |
+
|
| |
+ diff --git a/cups/encode.c b/cups/encode.c
|
| |
+ index 5bcbf6fe5..15b1c6b40 100644
|
| |
+ --- a/cups/encode.c
|
| |
+ +++ b/cups/encode.c
|
| |
+ @@ -655,6 +655,7 @@ _cupsEncodeOption(
|
| |
+ ippSetCollection(ipp, &attr, i, collection);
|
| |
+ cupsEncodeOptions2(collection, num_cols, cols, IPP_TAG_JOB);
|
| |
+ cupsFreeOptions(num_cols, cols);
|
| |
+ + ippDelete(collection);
|
| |
+ break;
|
| |
+
|
| |
+ default :
|
| |
+ diff --git a/cups/http.c b/cups/http.c
|
| |
+ index bd41e6f8e..4b6a24bd3 100644
|
| |
+ --- a/cups/http.c
|
| |
+ +++ b/cups/http.c
|
| |
+ @@ -4624,6 +4624,7 @@ http_tls_upgrade(http_t *http) /* I - HTTP connection */
|
| |
+ * Restore the HTTP request data...
|
| |
+ */
|
| |
+
|
| |
+ + httpClearFields(http);
|
| |
+ memcpy(http->_fields, myhttp._fields, sizeof(http->_fields));
|
| |
+ memcpy(http->fields, myhttp.fields, sizeof(http->fields));
|
| |
+
|
| |
+ --
|
| |
+ 2.31.1
|
| |
+
|
| |
fix for memory leaks in http_tls_upgrade() and _cupsEncodeOption()