Skip to content

Commit

Permalink
Fix unchecked return value. CID#1090413
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Sep 19, 2013
1 parent d91d7de commit 5ffdc64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/usb_moded-mac.c
Expand Up @@ -79,7 +79,8 @@ char * read_mac(void)
log_warning("Failed to read mac address from /etc/modprobe.d/g_ether.conf\n");
return(NULL);
}
fseek(g_ether, 26, SEEK_SET);
if(!fseek(g_ether, 26, SEEK_SET))
return 0;
mac = malloc(sizeof(char) *17);
if(mac)
read = fread(mac, 1, 17, g_ether);
Expand Down

0 comments on commit 5ffdc64

Please sign in to comment.