Re: [PATCH v2 01/10] sandbox/seunshare: free glob on error path
Stephen Smalley <[email protected]> Tue, 21 Jul 2026 08:56:30 -0400
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <CAEjxPJ6b41b09jt11_3ywbSJPYy+N0n+GRscOBojTPHcL86hZQ@mail.gmail.com> |
On Fri, Jul 17, 2026 at 2:34 PM Stephen Smalley <[email protected]> wrote: > > Free the glob on the error path for a failed calloc. > > Signed-off-by: Stephen Smalley <[email protected]> This series has been merged. > --- > 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 >