mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
venus: fix memory leak
The fs getserverprefs command displays preference ranks for file / volume location server machine interfaces. In order to get the complete set of preference ranks, the VIOC_GETSPREFS system call might have to be called several times. If so, the memory previously allocated should be released. Change-Id: I8491117ead626e70aac40343923d52284f274efd Reviewed-on: https://gerrit.openafs.org/12315 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
360f4ef53c
commit
d3b8a05d22
@ -3351,10 +3351,10 @@ GetPrefCmd(struct cmd_syndesc *as, void *arock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
in->offset = out->next_offset;
|
in->offset = out->next_offset;
|
||||||
} while (out->next_offset > 0);
|
if (blob.out != space) {
|
||||||
|
|
||||||
if (blob.out != space)
|
|
||||||
free(blob.out);
|
free(blob.out);
|
||||||
|
}
|
||||||
|
} while (in->offset > 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user