Commit 0b5ae397 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add forgotten error checking in kernel_socket.

parent 0845af77
...@@ -108,6 +108,8 @@ get_sdl(struct sockaddr_dl *sdl, char *ifname) ...@@ -108,6 +108,8 @@ get_sdl(struct sockaddr_dl *sdl, char *ifname)
return -1; return -1;
buffer = (char *)malloc(buf_len); buffer = (char *)malloc(buf_len);
if(buffer == NULL)
return -1;
rc = sysctl(mib, 6, buffer, &buf_len, NULL, 0); rc = sysctl(mib, 6, buffer, &buf_len, NULL, 0);
if(rc < 0) if(rc < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment