| Message ID | 1301490729-22084-3-git-send-email-ander.conselvan-de-oliveira@nokia.com |
|---|---|
| State | Accepted, archived |
| Commit | 396e5a452a59c1f121220ba72167b720a863b30f |
| Headers | show |
diff --git a/src/FSWrap.c b/src/FSWrap.c index a947093..94d94fb 100644 --- a/src/FSWrap.c +++ b/src/FSWrap.c @@ -131,7 +131,7 @@ copy_string_list( char **string_list_ret, **list_src, **list_dst, *dst; int length, count; - if (string_list == NULL) + if (string_list == NULL || list_count == 0) return (char **) NULL; string_list_ret = (char **) Xmalloc(sizeof(char *) * list_count);
If list_count is 0, dst would be allocated and leaked. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> --- src/FSWrap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)