From 7eb3e4364c2bcebd2fdfef52c07f5101aa03e5bb Mon Sep 17 00:00:00 2001 From: Ashwini Sharma Date: Tue, 12 Aug 2014 07:09:01 -0500 Subject: Patches to commands for issues reported from static analysis tool. portability.h.patch - it is for O_CLOEXEC, as compiler complained of it. Makefile.patch - for cleaning generated/*.o files and libopts.dat file [Fixup to uniq.c from Rob.] --- toys/pending/modprobe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toys/pending/modprobe.c') diff --git a/toys/pending/modprobe.c b/toys/pending/modprobe.c index b8ef4824..cbf929b9 100644 --- a/toys/pending/modprobe.c +++ b/toys/pending/modprobe.c @@ -199,7 +199,7 @@ static int read_line(FILE *fl, char **li) } line[len] = '\0'; *li = xstrdup(line); - if (line) free(line); + free(line); if (nxtline) free(nxtline); return len; } @@ -302,6 +302,7 @@ static int depmode_read_entry(char *cmdname) } free(line); } + fclose(fe); return ret; } -- cgit v1.2.3