From ab741a257f66811a911ce819896af293d26af487 Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 23 Jul 2014 20:16:02 +0100 Subject: [PATCH] [Fix] Fixed a memory leak. --- src/spfx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spfx.c b/src/spfx.c index 5616ed8..49f9bf2 100644 --- a/src/spfx.c +++ b/src/spfx.c @@ -215,6 +215,10 @@ int spfx_load(void) { /* Shrink back to minimum - shouldn't change ever. */ spfx_effects = realloc(spfx_effects, sizeof(SPFX_Base) * spfx_neffects); + /* Clean up. */ + xmlFreeDoc(doc); + free(buf); + /* Now initialize force feedback. */ spfx_hapticInit();