Fix build on FreeBSD

This commit is contained in:
pancake 2016-10-03 15:08:21 +02:00
parent f0f54ad1c6
commit 0080399021

View File

@ -804,7 +804,9 @@ static RList *r_debug_native_sysctl_map (RDebug *dbg) {
if (sysctl (mib, 4, NULL, &len, NULL, 0) != 0) return NULL;
len = len * 4 / 3;
buf = malloc(len);
if (!buf) {return NULL};
if (!buf) {
return NULL;
}
if (sysctl (mib, 4, buf, &len, NULL, 0) != 0) {
free (buf);
return NULL;
@ -1425,7 +1427,9 @@ static RList *r_debug_desc_native_list (int pid) {
if (sysctl (mib, 4, NULL, &len, NULL, 0) != 0) return NULL;
len = len * 4 / 3;
buf = malloc(len);
if (!buf) {return NULL};
if (!buf) {
return NULL;
}
if (sysctl (mib, 4, buf, &len, NULL, 0) != 0) {
free (buf);
return NULL;