pie: piegen -- Fix memory leak

| CID 96750 (#1 of 1): Resource leak (RESOURCE_LEAK)
 | 163. leaked_storage: Variable sec_hdrs going out of scope leaks the storage it points to.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2015-07-13 14:53:45 +03:00 committed by Pavel Emelyanov
parent b857ca947c
commit 337ba4f3a6

View file

@ -504,6 +504,7 @@ int handle_elf(void *mem, size_t size)
}
}
pr_out("};\n");
free(sec_hdrs);
return 0;
err:
free(sec_hdrs);