diff options
author | Matt Turner <mattst88@gmail.com> | 2010-06-10 04:08:54 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-11 19:05:46 +0700 |
commit | f4190feb25ecc3d8278decc8bf28a5ef0e568942 (patch) | |
tree | 1bda33d8d65126f4a7d2a53f6efdb69e4a426e1d /xkb/xkb.c | |
parent | 89bd05106e5823fc5cfca9abf082729f2444363b (diff) |
Remove more superfluous if(p) checks around free(p)
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Diffstat (limited to 'xkb/xkb.c')
-rw-r--r-- | xkb/xkb.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -5510,10 +5510,8 @@ ProcXkbListComponents(ClientPtr client) if ((XkbPaddedSize(len)/4)!=stuff->length) return BadLength; if ((status=XkbDDXList(dev,&list,client))!=Success) { - if (list.pool) { - free(list.pool); - list.pool= NULL; - } + free(list.pool); + list.pool = NULL; return status; } memset(&rep, 0, sizeof(xkbListComponentsReply)); @@ -5886,11 +5884,16 @@ ProcXkbGetKbdByName(ClientPtr client) XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE); new= NULL; } - if (names.keycodes) { free(names.keycodes); names.keycodes= NULL; } - if (names.types) { free(names.types); names.types= NULL; } - if (names.compat) { free(names.compat); names.compat= NULL; } - if (names.symbols) { free(names.symbols); names.symbols= NULL; } - if (names.geometry) { free(names.geometry); names.geometry= NULL; } + free(names.keycodes); + names.keycodes = NULL; + free(names.types); + names.types = NULL; + free(names.compat); + names.compat = NULL; + free(names.symbols); + names.symbols = NULL; + free(names.geometry); + names.geometry = NULL; return Success; } |