diff options
author | Adam Jackson <ajax@redhat.com> | 2018-10-16 12:39:26 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-10-16 12:39:26 -0400 |
commit | a1e1a7b0b9a7bcededfc9166df58541675615699 (patch) | |
tree | 6e6b3316a0685cd3ec5fea9bd73a19c976438c94 | |
parent | 57ce065b3c4329838f82de7e791caa52345a8c6f (diff) | |
download | xorg-lib-libXp-a1e1a7b0b9a7bcededfc9166df58541675615699.tar.gz |
Fix a memory leak on the error path in XpGetLocaleNetString
After Data() we own the pointer again, so we can just free it before
getting the reply.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | src/XpPrinter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/XpPrinter.c b/src/XpPrinter.c index 03b18c4..4e8cdc9 100644 --- a/src/XpPrinter.c +++ b/src/XpPrinter.c @@ -118,14 +118,14 @@ XpGetPrinterList ( if (req->localeLen) Data( dpy, (char *) locale, (long) req->localeLen ); + XFree(locale); + if (! _XReply (dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return ( (XPPrinterList) NULL ); /* error */ } - XFree(locale); - *list_count = rep.listCount; if (*list_count) { |