diff options
author | Maninder Singh <maninder1.s@samsung.com> | 2015-06-01 10:38:07 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-06-07 18:19:43 +0200 |
commit | 0fabedf085591b50994e4f8c133bfa87f1777ee4 (patch) | |
tree | 8308679426e463e68eb9f61cf5883c03c437c79d /scripts/kconfig/util.c | |
parent | d90899206dd96b4c18064c18afc3b856382e64d4 (diff) | |
download | busybox-w32-0fabedf085591b50994e4f8c133bfa87f1777ee4.tar.gz busybox-w32-0fabedf085591b50994e4f8c133bfa87f1777ee4.tar.bz2 busybox-w32-0fabedf085591b50994e4f8c133bfa87f1777ee4.zip |
fix if(p)/free(p) construct
No need of explicit NULL check before free.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | scripts/kconfig/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 263091945..13369e6a1 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
@@ -79,8 +79,7 @@ struct gstr str_assign(const char *s) | |||
79 | /* Free storage for growable string */ | 79 | /* Free storage for growable string */ |
80 | void str_free(struct gstr *gs) | 80 | void str_free(struct gstr *gs) |
81 | { | 81 | { |
82 | if (gs->s) | 82 | free(gs->s); |
83 | free(gs->s); | ||
84 | gs->s = NULL; | 83 | gs->s = NULL; |
85 | gs->len = 0; | 84 | gs->len = 0; |
86 | } | 85 | } |