added missing free()s

This commit is contained in:
Bart Lauret 2012-03-07 15:12:48 +01:00
parent 405f766e1f
commit 07c618aaa4
2 changed files with 7 additions and 2 deletions

View file

@ -452,8 +452,10 @@ cwc_send_msg(cwc_t *cwc, const uint8_t *msg, size_t len, int sid, int enq)
uint8_t *buf = cm->cm_data;
int seq, n;
if(len + 12 > CWS_NETMSGSIZE)
if(len + 12 > CWS_NETMSGSIZE) {
free(cm);
return -1;
}
memset(buf, 0, 12);
memcpy(buf + 12, msg, len);
@ -469,6 +471,7 @@ cwc_send_msg(cwc_t *cwc, const uint8_t *msg, size_t len, int sid, int enq)
if((len = des_encrypt(buf, len, cwc)) < 0) {
free(buf);
free(cm);
return -1;
}

View file

@ -226,8 +226,10 @@ pvr_generate_filename(dvr_entry_t *de)
/* */
if(makedirs(path) != 0)
if(makedirs(path) != 0) {
free(filename);
return -1;
}
/* Construct final name */