mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 23:11:19 +01:00
fix memory leaks in sys/net/ccn_lite/util/ccn-lite-ctrl.c
This commit is contained in:
parent
52c92aa3b2
commit
1722b936b8
@ -47,6 +47,7 @@ mkNewFaceRequest(unsigned char *out, char *macsrc, char *ip4src,
|
||||
|
||||
unsigned char *faceinst = malloc(500);
|
||||
if (!faceinst) {
|
||||
free(contentobj);
|
||||
puts("mkNewFaceRequest: malloc failed");
|
||||
return 0;
|
||||
}
|
||||
@ -123,7 +124,8 @@ mkPrefixregRequest(unsigned char *out, char reg, char *path, char *faceid)
|
||||
}
|
||||
|
||||
unsigned char *fwdentry = malloc(500);
|
||||
if (!contentobj) {
|
||||
if (!fwdentry) {
|
||||
free(contentobj);
|
||||
puts("mkNewFaceRequest: malloc failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user