plugins/python: fix memory leak

Reported by Coverity as CID #971056
This commit is contained in:
Riccardo Magliocchetti
2013-12-27 18:45:44 +01:00
parent 5785c61a13
commit 46322b84b4
+3 -1
View File
@@ -1795,7 +1795,8 @@ static void uwsgi_python_harakiri(int wid) {
if (up.tracebacker) {
char buf[8192];
char *address = uwsgi_concat2(up.tracebacker, uwsgi_num2str(wid));
char *wid_str = uwsgi_num2str(wid);
char *address = uwsgi_concat2(up.tracebacker, wid_str);
int fd = uwsgi_connect(address, -1, 0);
if (fd < 1)
@@ -1814,6 +1815,7 @@ static void uwsgi_python_harakiri(int wid) {
cleanup:
close(fd);
exit:
free(wid_str);
free(address);
}