mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
check return value of locking_init()
This commit is contained in:
parent
c16f051a40
commit
0efac70f75
@ -309,17 +309,19 @@ static void print_share_mode(share_mode_entry *e, char *fname)
|
||||
printf("\n");
|
||||
|
||||
if (!shares_only) {
|
||||
if (!locking_init(1)) {
|
||||
printf("Can't initialise shared memory - exiting\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
locking_init(1);
|
||||
|
||||
if (share_mode_forall(print_share_mode) <= 0)
|
||||
printf("No locked files\n");
|
||||
|
||||
printf("\n");
|
||||
|
||||
share_status(stdout);
|
||||
|
||||
locking_end();
|
||||
if (share_mode_forall(print_share_mode) <= 0)
|
||||
printf("No locked files\n");
|
||||
|
||||
printf("\n");
|
||||
|
||||
share_status(stdout);
|
||||
|
||||
locking_end();
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user