diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-03 07:06:42 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-03 07:06:42 +0000 |
commit | 4bc5a25c21006e547ff7fce7fff7544acbb22174 (patch) | |
tree | 1131660dedc1706245380ff2be67b73529050398 /src | |
parent | 9680fbed52e3af20d226040958f91502b6027d2d (diff) |
Coverity #369: If malloc of entry->wm_command fails, error cleanup was
still trying to read pointers from it to free.
Diffstat (limited to 'src')
-rw-r--r-- | src/session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/session.c b/src/session.c index 01fa593..7c4ce99 100644 --- a/src/session.c +++ b/src/session.c @@ -1,5 +1,5 @@ /* $Xorg: session.c,v 1.5 2001/02/09 02:05:37 xorgcvs Exp $ */ -/* $XdotOrg: $ */ +/* $XdotOrg: app/twm/src/session.c,v 1.3 2005/07/16 22:07:13 alanc Exp $ */ /****************************************************************************** Copyright 1994, 1998 The Open Group @@ -529,7 +529,7 @@ give_up: free (entry->class.res_class); if (entry->wm_name) free (entry->wm_name); - if (entry->wm_command_count) + if (entry->wm_command_count && entry->wm_command) { for (i = 0; i < entry->wm_command_count; i++) if (entry->wm_command[i]) |