summaryrefslogtreecommitdiff
path: root/src/utilities/util_main.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-11-22 09:29:33 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-11-22 09:29:33 +1100
commite9fe236b39327afd171c9f7c964dfb2da3740e4a (patch)
treec1d4bc506a5cb3f046b0f360ccc246545189012e /src/utilities/util_main.c
parent3f36100c955dceb6765ad40c60bef9446230252a (diff)
downloadmongo-e9fe236b39327afd171c9f7c964dfb2da3740e4a.tar.gz
Fix a trivial leak in the utility.
Diffstat (limited to 'src/utilities/util_main.c')
-rw-r--r--src/utilities/util_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utilities/util_main.c b/src/utilities/util_main.c
index 5903aea3e28..31e343106fb 100644
--- a/src/utilities/util_main.c
+++ b/src/utilities/util_main.c
@@ -29,6 +29,7 @@ main(int argc, char *argv[])
const char *cmd_config, *config;
conn = NULL;
+ p = NULL;
/* Get the program name. */
if ((progname = strrchr(argv[0], '/')) == NULL)
@@ -184,6 +185,9 @@ main(int argc, char *argv[])
err: if (conn != NULL && (tret = conn->close(conn, NULL)) != 0 && ret == 0)
ret = tret;
+ if (p != NULL)
+ free(p);
+
return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}