Blame SOURCES/0001-Fix-a-memory-leak-on-the-error-path-in-XpGetLocaleNe.patch

e7e030
From a1e1a7b0b9a7bcededfc9166df58541675615699 Mon Sep 17 00:00:00 2001
e7e030
From: Adam Jackson <ajax@redhat.com>
e7e030
Date: Tue, 16 Oct 2018 12:39:26 -0400
e7e030
Subject: [PATCH] Fix a memory leak on the error path in XpGetLocaleNetString
e7e030
e7e030
After Data() we own the pointer again, so we can just free it before
e7e030
getting the reply.
e7e030
e7e030
Signed-off-by: Adam Jackson <ajax@redhat.com>
e7e030
---
e7e030
 src/XpPrinter.c | 4 ++--
e7e030
 1 file changed, 2 insertions(+), 2 deletions(-)
e7e030
e7e030
diff --git a/src/XpPrinter.c b/src/XpPrinter.c
e7e030
index 03b18c4..4e8cdc9 100644
e7e030
--- a/src/XpPrinter.c
e7e030
+++ b/src/XpPrinter.c
e7e030
@@ -118,14 +118,14 @@ XpGetPrinterList (
e7e030
     if (req->localeLen)
e7e030
 	Data( dpy, (char *) locale, (long) req->localeLen );
e7e030
 
e7e030
+    XFree(locale);
e7e030
+
e7e030
     if (! _XReply (dpy, (xReply *) &rep, 0, xFalse)) {
e7e030
         UnlockDisplay(dpy);
e7e030
         SyncHandle();
e7e030
         return ( (XPPrinterList) NULL ); /* error */
e7e030
     }
e7e030
 
e7e030
-    XFree(locale);
e7e030
-
e7e030
     *list_count = rep.listCount;
e7e030
 
e7e030
     if (*list_count) {
e7e030
-- 
e7e030
2.19.0
e7e030