Skip to content

Commit

Permalink
Fixes possible segfault during audio firmware loading.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bodenbenner <[email protected]> (bodedejavu)
  • Loading branch information
bodedejavu committed Apr 8, 2015
1 parent 95ae970 commit 7be4875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ FN_INTERNAL int upload_firmware(fnusb_dev* dev, char * filename) {
break;
case 3:
//fwfile = "/usr/local/share/libfreenect/audios.bin";
fwfile = (char *)malloc(2048);
needs_free = 1;
sprintf(fwfile, "/usr/local/share/libfreenect%s", fw_filename);

break;
case 4:
//fwfile = "/usr/share/libfreenect/audios.bin";
Expand Down

0 comments on commit 7be4875

Please sign in to comment.