diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index 68f4c45c1..f80128e49 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -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; }