- Timestamp:
- 09/03/07 21:47:42 (15 months ago)
- Files:
-
- 1 modified
-
trunk/obexftp/cache.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/obexftp/cache.c
r191 r192 62 62 char *copy, *p; 63 63 64 return_val_if_fail(name != NULL, strdup(""));64 if (!name) name = ""; 65 65 66 66 p = copy = malloc(strlen(name) + 2); /* at most add two slashes */ … … 445 445 for (cache = cli->cache; cache && strcmp(cache->name, abs); cache = cache->next); 446 446 free(abs); 447 if (!cache) 448 return NULL; 447 if (!cache) { 448 free(path); 449 return NULL; 450 } 449 451 DEBUG(2, "%s() found '%s'\n", __func__, cache->name); 450 452 … … 453 455 cache->stats = parse_directory(cache->content); 454 456 DEBUG(2, "%s() got dir '%s'\n", __func__, path); 455 free(path);456 457 457 458 /* then lookup the basename */ 458 459 for (entry = cache->stats; entry && *entry->name && strcmp(entry->name, basename); entry++); 460 free(path); 459 461 if (!entry || !(*entry->name)) 460 462 return NULL;
