[rtmpdump] r198 - trunk/hashswf.c
hyc
subversion at mplayerhq.hu
Wed Jan 6 10:42:46 CET 2010
Author: hyc
Date: Wed Jan 6 10:42:45 2010
New Revision: 198
Log:
Plug mem leaks
Modified:
trunk/hashswf.c
Modified: trunk/hashswf.c
==============================================================================
--- trunk/hashswf.c Wed Jan 6 05:28:29 2010 (r197)
+++ trunk/hashswf.c Wed Jan 6 10:42:45 2010 (r198)
@@ -323,7 +323,7 @@ RTMP_HashSWF(const char *url, unsigned i
}
if (got && !ask)
- return 0;
+ goto out;
in.first = 1;
in.date = date;
@@ -359,7 +359,8 @@ RTMP_HashSWF(const char *url, unsigned i
int err = errno;
Log(LOGERROR, "%s: couldn't open %s for writing, errno %d (%s)",
__FUNCTION__, path, err, strerror(err));
- return -1;
+ ret = -1;
+ goto out;
}
fseek(f, 0, SEEK_END);
q = strchr(url, '?');
@@ -378,6 +379,8 @@ RTMP_HashSWF(const char *url, unsigned i
fprintf(f, "\n");
}
HMAC_CTX_cleanup(&ctx);
+out:
+ free(path);
if (f)
fclose(f);
return ret;
More information about the rtmpdump
mailing list