From: Kern Sibbald Date: Fri, 16 Nov 2018 11:36:30 +0000 (+0100) Subject: Free ids buffer X-Git-Tag: Release-9.4.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5040f3188e59ba723fcce26ef0aaca4f3ba189a1;p=thirdparty%2Fbacula.git Free ids buffer --- diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c index 75cc67a3a..1122f12a4 100644 --- a/bacula/src/dird/ua_select.c +++ b/bacula/src/dird/ua_select.c @@ -607,7 +607,7 @@ bool select_pool_dbr(UAContext *ua, POOL_DBR *pr, const char *argk) POOL_DBR opr; char name[MAX_NAME_LENGTH]; int num_pools, i; - uint32_t *ids; + uint32_t *ids = NULL; for (i=1; iargc; i++) { if (strcasecmp(ua->argk[i], argk) == 0 && ua->argv[i] && @@ -630,6 +630,9 @@ bool select_pool_dbr(UAContext *ua, POOL_DBR *pr, const char *argk) } if (num_pools <= 0) { ua->error_msg(_("No pools defined. Use the \"create\" command to create one.\n")); + if (ids) { + free(ids); + } return false; }