diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-filesys.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test-filesys.c b/tests/test-filesys.c index 492dbada0..6771b434b 100644 --- a/tests/test-filesys.c +++ b/tests/test-filesys.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <string.h> +#include <stdlib.h> #ifdef HAVE_MCHECK_H #include <mcheck.h> @@ -145,6 +146,7 @@ main () CameraList *list; int x, count; const char *name; + char *foldername; GPContext *context; #ifdef HAVE_MCHECK_H @@ -268,8 +270,9 @@ main () } printf ("*** Getting folder of 'file1'...\n"); - CHECK (gp_filesystem_get_folder (fs, "file1", &name, context)); - printf ("... found in '%s'.\n", name); + CHECK (gp_filesystem_get_folder (fs, "file1", &foldername, context)); + printf ("... found in '%s'.\n", foldername); + free(foldername); printf ("*** Deleting a couple of files...\n"); CHECK (gp_filesystem_delete_file (fs, "/whatever", "file5", context)); |