Submit #2778 » 0001-lib-libhammer-fix-minor-memory-leaks.patch
lib/libhammer/misc.c | ||
---|---|---|
mntbufsize = (mntsize) * sizeof(struct statfs);
|
||
mntbuf = _libhammer_malloc(mntbufsize);
|
||
if (mntbuf == NULL) {
|
||
perror("show_info");
|
||
exit(EXIT_FAILURE);
|
||
}
|
||
mntsize = getfsstat(mntbuf, (long)mntbufsize, MNT_NOWAIT);
|
||
curmount = mntsize - 1;
|
||
... | ... | |
}
|
||
if ((ioctl(fd, HAMMERIOC_GET_INFO, &hi)) < 0) {
|
||
close(fd);
|
||
curmount--;
|
||
continue;
|
||
}
|
||
... | ... | |
close(fd);
|
||
}
|
||
free(trailstr);
|
||
free(mntbuf);
|
||
return retval;
|
||
}
|