]>
git.proxmox.com Git - mirror_lxcfs.git/commit - src/lxcfs.c
lxcfs: handle NULL path in lxcfs_releasedir/lxcfs_release
Implement a file_info_type function.
Create a series of defines for the file type
Inspect the file type for each file handler and perform the relevant
release code to free any memory.
If the type cannot be determined, print an error and return -EINVAL.
This should also be slightly faster than a strcmp() but its not likely
that measurable.
This code could be used elsewhere in the process to reduce the strcmp
requirements, but for now just handle the release/releasedir case.
This fixes SEGV in lxcfs_relase/releasedir when path=NULL but invoked a
strcmp().
Signed-off-by: Matthew Ife <matthewi@mustardsystems.com>