projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
send use m_getfld2
[mmh]
/
sbr
/
crawl_folders.c
diff --git
a/sbr/crawl_folders.c
b/sbr/crawl_folders.c
index
2e1a094
..
7164616
100644
(file)
--- a/
sbr/crawl_folders.c
+++ b/
sbr/crawl_folders.c
@@
-68,7
+68,7
@@
add_children(char *name, struct crawl_context *crawl)
}
if (strcmp(name, ".") == 0) {
}
if (strcmp(name, ".") == 0) {
- prefix = getcpy("");
+ prefix = mh_xstrdup("");
} else {
prefix = concat(name, "/", (void *)NULL);
}
} else {
prefix = concat(name, "/", (void *)NULL);
}
@@
-102,12
+102,12
@@
add_children(char *name, struct crawl_context *crawl)
/* add_folder saves child in the list, don't free it */
add_folder(child, crawl);
} else {
/* add_folder saves child in the list, don't free it */
add_folder(child, crawl);
} else {
- free(child);
+ mh_free0(&child);
}
}
closedir(dd);
}
}
closedir(dd);
- free(prefix);
+ mh_free0(&prefix);
}
static void
}
static void
@@
-153,6
+153,6
@@
crawl_folders(char *dir, crawl_callback_t *callback, void *baton)
** Note that we "leak" the folder names, on the assumption that the
** caller is using them.
*/
** Note that we "leak" the folder names, on the assumption that the
** caller is using them.
*/
- free(crawl->folders);
- free(crawl);
+ mh_free0(&(crawl->folders));
+ mh_free0(&crawl);
}
}