Signed-off-by: Sami Kerola <kerolasa@iki.fi>
if (!fgets(buffer, SLABINFO_VER_LEN, slabfile)) {
fprintf(stderr, "cannot read from slabinfo\n");
- free(slabfile);
+ fclose(slabfile);
return 1;
}
if (sscanf(buffer, "slabinfo - version: %d.%d", &major, &minor) != 2) {
fprintf(stderr, "not the good old slabinfo we know\n");
- free(slabfile);
+ fclose(slabfile);
return 1;
}
ret = parse_slabinfo10(list, stats, slabfile);
else {
fprintf(stderr, "unrecognizable slabinfo version\n");
- free(slabfile);
+ fclose(slabfile);
return 1;
}