Skip to content

Commit

Permalink
[usb-moded] Fix resource leak. CID#1090411
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 Oct 17, 2013
1 parent 13303ef commit 3185279
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/usb_moded-mac.c
Expand Up @@ -80,7 +80,10 @@ char * read_mac(void)
return(NULL);
}
if(!fseek(g_ether, 26, SEEK_SET))
{
fclose(g_ether);
return 0;
}
mac = malloc(sizeof(char) *17);
if(mac)
read = fread(mac, 1, 17, g_ether);
Expand Down

0 comments on commit 3185279

Please sign in to comment.