On Mon, Jul 18, 2022 at 1:45 AM Jo-Philipp Wich wrote:
>
> Hi,
>
> > [...]
> > - free(aliases);
> > + if (aliases)
> > + free(aliases);
>
> This check is redundant, the free() function is guaranteed to be NULL-safe in
> the standard:
>
>The free() function shall cause the space
Hi,
> [...]
> - free(aliases);
> + if (aliases)
> + free(aliases);
This check is redundant, the free() function is guaranteed to be NULL-safe in
the standard:
The free() function shall cause the space pointed to by ptr to be
deallocated; that is, made available for further
memory leaks and missing NULL checks.
Signed-off-by: Rosen Penev
---
kmodloader.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/kmodloader.c b/kmodloader.c
index 63bae5e..bc5f20c 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -336,6 +336,11 @@ static int sc