1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00

fix: fixed memory leak

This commit is contained in:
Falk Werner 2019-01-31 21:43:49 +01:00
parent 0c0c94242a
commit 705437254d

View File

@ -15,7 +15,7 @@ struct args
{ {
struct wsfs_server_config config; struct wsfs_server_config config;
char * mount_point; char * mount_point;
int show_help; bool show_help;
}; };
static void show_help(void) static void show_help(void)
@ -97,16 +97,20 @@ static int parse_arguments(int argc, char * argv[], struct args * args)
} }
} }
if ((EXIT_SUCCESS == result) && (!args->show_help))
{
if (NULL == args->mount_point)
{
fprintf(stderr, "error: missing mount point\n");
result = EXIT_FAILURE;
}
}
if (EXIT_SUCCESS != result) if (EXIT_SUCCESS != result)
{ {
args->show_help = true; args->show_help = true;
} }
if ((!args->show_help) && (NULL == args->mount_point))
{
fprintf(stderr, "error: missing mount point\n");
}
return result; return result;
} }