Commit 7754f2e7 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

gphoto2.ds: Replace malloc() with HeapAlloc().

parent d904d135
...@@ -63,7 +63,7 @@ load_filesystem(const char *folder) { ...@@ -63,7 +63,7 @@ load_filesystem(const char *folder) {
ret = gp_list_get_name (list, i, &name); ret = gp_list_get_name (list, i, &name);
if (ret < GP_OK) if (ret < GP_OK)
continue; continue;
gpfile = malloc(sizeof(struct gphoto2_file)); gpfile = HeapAlloc(GetProcessHeap(), 0, sizeof(struct gphoto2_file));
if (!gpfile) if (!gpfile)
continue; continue;
TRACE("adding %s/%s\n", folder, name); TRACE("adding %s/%s\n", folder, name);
...@@ -93,7 +93,7 @@ load_filesystem(const char *folder) { ...@@ -93,7 +93,7 @@ load_filesystem(const char *folder) {
if (ret < GP_OK) if (ret < GP_OK)
continue; continue;
TRACE("recursing into %s\n", name); TRACE("recursing into %s\n", name);
newfolder = malloc(strlen(folder)+1+strlen(name)+1); newfolder = HeapAlloc(GetProcessHeap(), 0, strlen(folder)+1+strlen(name)+1);
if (!strcmp(folder,"/")) if (!strcmp(folder,"/"))
sprintf (newfolder, "/%s", name); sprintf (newfolder, "/%s", name);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment