free (xx) on return (Coverity)

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14644 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-01-05 22:04:49 +00:00
parent c31c097801
commit 1dc0acced5

View File

@@ -489,7 +489,7 @@ traverse_tree (PTPParams *params, int depth, xmlNodePtr node) {
if (!node) return 0;
xx = malloc(depth * 4 + 1);
xx = malloc (depth * 4 + 1);
memset (xx, ' ', depth*4);
xx[depth*4] = 0;
@@ -503,6 +503,7 @@ traverse_tree (PTPParams *params, int depth, xmlNodePtr node) {
fprintf(stderr,"%scontent %s\n", xx,xchar);
traverse_tree (params, depth+1,xmlFirstElementChild (next));
} while ((next = xmlNextElementSibling (next)));
free (xx);
return PTP_RC_OK;
}