From f32a7021f11af87b562a9f95d2d40bc28d36304e Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Fri, 3 Mar 2017 18:51:55 -0500 Subject: [PATCH] Fix potential memory leak. --- src/commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands.c b/src/commands.c index 77ea780c..3d83addb 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1742,7 +1742,11 @@ do_get (assuan_context_t ctx, char *line) log_write (_("invalid expire attribute value: %s"), expire); else if (now >= e) - rc = send_status (ctx, STATUS_EXPIRE, "%lu 0", e); + { + pthread_cleanup_push (xmlFree, expire); + rc = send_status (ctx, STATUS_EXPIRE, "%lu 0", e); + pthread_cleanup_pop (0); + } xmlFree (expire); } -- 2.11.4.GIT