Mercurial > hg > toybox
diff toys/other/losetup.c @ 1518:4bfbd8b96f66 draft
Various bugfixes (mostly resource leaks) from Ashwini Sharma's static analysis, plus occasional tweak by me while reviewing them.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 09 Oct 2014 13:43:32 -0500 |
parents | 43bed82c87df |
children | 41efba077b75 |
line wrap: on
line diff
--- a/toys/other/losetup.c Thu Oct 09 12:17:36 2014 -0500 +++ b/toys/other/losetup.c Thu Oct 09 13:43:32 2014 -0500 @@ -86,7 +86,7 @@ // Stat the loop device to see if there's a current association. memset(loop, 0, sizeof(struct loop_info64)); if (-1 == lfd || ioctl(lfd, LOOP_GET_STATUS64, loop)) { - if (errno == ENXIO && (flags & (FLAG_a|FLAG_j))) return; + if (errno == ENXIO && (flags & (FLAG_a|FLAG_j))) goto done; if (errno != ENXIO || !file) { perror_msg("%s", device ? device : "-f"); goto done;