comparison gui/util/list.c @ 36155:29c690aefc6f

Fix resource leak.
author ib
date Wed, 08 May 2013 12:39:56 +0000
parents 319cbb4d0967
children 0da6c7ff95d2
comparison
equal deleted inserted replaced
36154:319cbb4d0967 36155:29c690aefc6f
365 else 365 else
366 strcpy(path, "."); 366 strcpy(path, ".");
367 367
368 item = calloc(1, sizeof(plItem)); 368 item = calloc(1, sizeof(plItem));
369 369
370 if (!item) 370 if (!item) {
371 free(path);
371 return False; 372 return False;
373 }
372 374
373 mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[list] adding %s/%s\n", path, file); 375 mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[list] adding %s/%s\n", path, file);
374 376
375 item->name = strdup(file); 377 item->name = strdup(file);
376 item->path = path; 378 item->path = path;