mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
vos: free ubulkentries with xdr_free
Instead of using free() to free the ubulkentries data structure use xdr_free(). Change-Id: I367e984d1777fcc8a3ec81b501174fae2fd0c8ff Reviewed-on: http://gerrit.openafs.org/3590 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
9f17cef3d3
commit
a7836dda8c
@ -4430,8 +4430,8 @@ DeleteEntry(struct cmd_syndesc *as, void *arock)
|
||||
fprintf(STDOUT,
|
||||
"Total VLDB entries deleted: %lu; failed to delete: %lu\n",
|
||||
(unsigned long)totalBack, (unsigned long)totalFail);
|
||||
if (arrayEntries.ubulkentries_val)
|
||||
free(arrayEntries.ubulkentries_val);
|
||||
|
||||
xdr_free((xdrproc_t) xdr_ubulkentries, &arrayEntries);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4626,10 +4626,7 @@ ListVLDB(struct cmd_syndesc *as, void *arock)
|
||||
}
|
||||
|
||||
/* Free the bulk array */
|
||||
if (arrayEntries.ubulkentries_val) {
|
||||
free(arrayEntries.ubulkentries_val);
|
||||
arrayEntries.ubulkentries_val = 0;
|
||||
}
|
||||
xdr_free((xdrproc_t) xdr_ubulkentries, &arrayEntries);
|
||||
}
|
||||
|
||||
/* Here is where we now sort all the entries and print them */
|
||||
@ -4981,8 +4978,7 @@ BackSys(struct cmd_syndesc *as, void *arock)
|
||||
fprintf(STDOUT, "Total volumes backed up: %lu; failed to backup: %lu\n",
|
||||
(unsigned long)totalBack, (unsigned long)totalFail);
|
||||
fflush(STDOUT);
|
||||
if (arrayEntries.ubulkentries_val)
|
||||
free(arrayEntries.ubulkentries_val);
|
||||
xdr_free((xdrproc_t) xdr_ubulkentries, &arrayEntries);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5083,8 +5079,7 @@ UnlockVLDB(struct cmd_syndesc *as, void *arock)
|
||||
}
|
||||
}
|
||||
|
||||
if (arrayEntries.ubulkentries_val)
|
||||
free(arrayEntries.ubulkentries_val);
|
||||
xdr_free((xdrproc_t) xdr_ubulkentries, &arrayEntries);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user