The current code returns from the function when the call to ioctl
fails. This may leak cache_dir_name and cache_full_name. Fix it.
Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
if (ret < 0) {
fprintf(stderr, "ERROR: can't perform the search- %s\n",
strerror(e));
- return ret;
+ break;
}
/* the ioctl returns the number of item it found in nr_items */
if (sk->nr_items == 0)