diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-06 15:28:30 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-06 20:27:18 +0700 |
commit | 0a4d8cbdcd7b25313fb29ccdb498044af95f7de6 (patch) | |
tree | 3534c9035180b7e0d2ebbbf0202a370cb61f8e8d /glx/single2.c | |
parent | 5a0fc0ad21d562612676ef88ef2d533b2391810a (diff) |
Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
-if(E) { free(E); }
+free(E);
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'glx/single2.c')
-rw-r--r-- | glx/single2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/glx/single2.c b/glx/single2.c index 070062691..56ad86dc6 100644 --- a/glx/single2.c +++ b/glx/single2.c @@ -272,10 +272,8 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) s2 = sext_string; } if (!combo_string || !s1) { - if (combo_string) - free(combo_string); - if (s1) - free(s1); + free(combo_string); + free(s1); return NULL; } combo_string[0] = '\0'; |