From fd394515010c5c17631a204b831ea15eca8497e8 Mon Sep 17 00:00:00 2001 From: pfg Date: Sat, 30 Apr 2016 22:51:09 +0000 Subject: restore: fix memory leak. CID: 272297 MFC after: 5 days --- sbin/restore/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sbin/restore') diff --git a/sbin/restore/main.c b/sbin/restore/main.c index 91f4a83..d74e59e 100644 --- a/sbin/restore/main.c +++ b/sbin/restore/main.c @@ -366,7 +366,8 @@ obsolete(int *argcp, char **argvp[]) if (flags) { *p = '\0'; *nargv++ = flagsp; - } + } else + free(flagsp); /* Copy remaining arguments. */ while ((*nargv++ = *argv++)); -- cgit v1.1