|
@@ -295,13 +295,19 @@ svc_expkey_update(struct cache_detail *cd, struct svc_expkey *new,
|
|
|
|
|
|
static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc)
|
|
static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc)
|
|
{
|
|
{
|
|
|
|
+ struct nfsd4_fs_location *locations = fsloc->locations;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
+ if (!locations)
|
|
|
|
+ return;
|
|
|
|
+
|
|
for (i = 0; i < fsloc->locations_count; i++) {
|
|
for (i = 0; i < fsloc->locations_count; i++) {
|
|
- kfree(fsloc->locations[i].path);
|
|
|
|
- kfree(fsloc->locations[i].hosts);
|
|
|
|
|
|
+ kfree(locations[i].path);
|
|
|
|
+ kfree(locations[i].hosts);
|
|
}
|
|
}
|
|
- kfree(fsloc->locations);
|
|
|
|
|
|
+
|
|
|
|
+ kfree(locations);
|
|
|
|
+ fsloc->locations = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
static void svc_export_put(struct kref *ref)
|
|
static void svc_export_put(struct kref *ref)
|