diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-20 22:48:41 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-21 10:45:33 +0930 |
commit | 9db70fc3656064555873332003d842b880ca470c (patch) | |
tree | d1aaec716012f043f5ba4aa0e43bf879a32be214 /binutils/stabs.c | |
parent | c95949892f6f1e2974a0fb8a5463d7b6432ac469 (diff) | |
download | gdb-9db70fc3656064555873332003d842b880ca470c.zip gdb-9db70fc3656064555873332003d842b880ca470c.tar.gz gdb-9db70fc3656064555873332003d842b880ca470c.tar.bz2 |
Replace "if (x) free (x)" with "free (x)", binutils
* addr2line.c: Replace "if (x) free (x)" with "free (x)" throughout.
* dlltool.c: Likewise.
* elfcomm.c: Likewise.
* rddbg.c: Likewise.
* readelf.c: Likewise.
* stabs.c: Likewise.
* windmc.c: Likewise.
* windres.c: Likewise.
* wrstabs.c: Likewise.
Diffstat (limited to 'binutils/stabs.c')
-rw-r--r-- | binutils/stabs.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/binutils/stabs.c b/binutils/stabs.c index 7cd782d..9f043d1 100644 --- a/binutils/stabs.c +++ b/binutils/stabs.c @@ -2119,8 +2119,7 @@ parse_stab_struct_type (void * dhandle, || ! parse_stab_tilde_field (dhandle, info, pp, typenums, &vptrbase, &ownvptr, p_end)) { - if (fields != NULL) - free (fields); + free (fields); return DEBUG_TYPE_NULL; } @@ -2955,12 +2954,9 @@ parse_stab_members (void * dhandle, return TRUE; fail: - if (name != NULL) - free (name); - if (variants != NULL) - free (variants); - if (argtypes != NULL) - free (argtypes); + free (name); + free (variants); + free (argtypes); return FALSE; } @@ -3901,8 +3897,7 @@ stab_demangle_argtypes (void *dhandle, struct stab_handle *info, return minfo.args; error_return: - if (minfo.typestrings != NULL) - free (minfo.typestrings); + free (minfo.typestrings); return NULL; } @@ -4516,8 +4511,7 @@ stab_demangle_template (struct stab_demangle_info *minfo, const char **pp, if (s3 == NULL || s4 == NULL) { stab_bad_demangle (orig); - if (s3 != NULL) - free (s3); + free (s3); return FALSE; } |