[PATCH v2 01/10] sandbox/seunshare: free glob on error path
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <[email protected]> |
Free the glob on the error path for a failed calloc. Signed-off-by: Stephen Smalley <[email protected]> --- sandbox/seunshare.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sandbox/seunshare.c b/sandbox/seunshare.c index f2d637e1..0c32d03f 100644 --- a/sandbox/seunshare.c +++ b/sandbox/seunshare.c @@ -448,6 +448,7 @@ static int rsynccmd(const char *src, const char *dst, char ***cmd) *cmd = calloc(3 + fglob.gl_pathc + 2, sizeof(char *)); if (!*cmd) { fprintf(stderr, _("Out of memory\n")); + globfree(&fglob); return -1; } -- 2.55.0