]> git.ipfire.org Git - thirdparty/util-linux.git/commit
sys-utils: (setpriv): fix potential memory leak
authorMaks Mishin <maks.mishinFZ@gmail.com>
Tue, 10 Dec 2024 09:26:32 +0000 (12:26 +0300)
committerMaks Mishin <maks.mishinFZ@gmail.com>
Tue, 10 Dec 2024 09:35:23 +0000 (12:35 +0300)
commit480682e6423308df28fed2c33770a9c400db6806
tree7be97f0f8a6c3eda85bfc839240bde43a9ae2295
parent5763e74d3cea008c31bfd48bc88660a1a32ecfa6
sys-utils: (setpriv): fix potential memory leak

Dynamic memory, referenced by 'my_caps' is allocated by calling function 'xstrdup'
add then changed by calling of strsep function.
The free(my_caps) call is incorrect if my_caps != NULL, and points to some
place inside or outside the source string.

Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
sys-utils/setpriv.c