[Fix] Fixed mem leak.

This commit is contained in:
Allanis 2014-01-06 19:53:29 +00:00
parent d04acc1a35
commit 0dd49b7f5b
2 changed files with 7 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export OS
# VERSION. # VERSION.
VMAJOR := 0 VMAJOR := 0
VMINOR := 3 VMINOR := 3
VREV := 1 VREV := 2
VERSION = -DVMAJOR=$(VMAJOR) -DVMINOR=$(VMINOR) -DVREV=$(VREV) VERSION = -DVMAJOR=$(VMAJOR) -DVMINOR=$(VMINOR) -DVREV=$(VREV)
VERSIONFILE = VERSION VERSIONFILE = VERSION

View File

@ -173,8 +173,14 @@ int diff_apply(char* name) {
/* Check to see if it's the diff we're looking for. */ /* Check to see if it's the diff we're looking for. */
xmlr_attr(node, "name", diffname); xmlr_attr(node, "name", diffname);
if(strcmp(diffname, name)==0) { if(strcmp(diffname, name)==0) {
/* Apply it. */
diff_patch(node); diff_patch(node);
/* Clean up. */
free(diffname); free(diffname);
xmlFreeDoc(doc);
free(buf);
return 0; return 0;
} }
free(diffname); free(diffname);