]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Release memory on error paths
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 5 Nov 2024 17:17:50 +0000 (18:17 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 15 Nov 2024 18:59:45 +0000 (12:59 -0600)
commitebd0476972bfdfbbc23825dc6d0683e9dceea45b
tree6add51701947045d6390cd7ee7b7ef801167566d
parent5a5b4c545c2789665370eadb9e8b160502d08941
libkmod: Release memory on error paths

Do not override pointers to first list nodes if appending failed,
otherwise it's impossible to release already existing nodes of these
lists afterwards.

Remove the now unused function kmod_list_remove_n_latest as well.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/228
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-internal.h
libkmod/libkmod-list.c
libkmod/libkmod.c
testsuite/test-list.c