Skip to content

Commit

Permalink
Merge branch 'setpriv-parse-securebits' of https://github.com/maks-mi…
Browse files Browse the repository at this point in the history
…shin/util-linux

* 'setpriv-parse-securebits' of https://github.com/maks-mishin/util-linux:
  sys-utils: (setpriv): fix potential memory leak
  • Loading branch information
karelzak committed Oct 14, 2024
2 parents 0567efc + 8f15d94 commit fda5dc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys-utils/setpriv.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ static void do_caps(enum cap_type type, const char *caps)
static void parse_securebits(struct privctx *opts, const char *arg)
{
char *buf = xstrdup(arg);
char *source_buf = buf;
char *c;

opts->have_securebits = 1;
Expand Down Expand Up @@ -631,7 +632,7 @@ static void parse_securebits(struct privctx *opts, const char *arg)

opts->securebits |= SECBIT_KEEP_CAPS; /* We need it, and it's reset on exec */

free(buf);
free(source_buf);
}

static void do_selinux_label(const char *label)
Expand Down

0 comments on commit fda5dc7

Please sign in to comment.