aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 8513c598fabf..9a41d3ddd8df 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -295,13 +295,19 @@ svc_expkey_update(struct cache_detail *cd, struct svc_expkey *new,
295 295
296static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc) 296static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc)
297{ 297{
298 struct nfsd4_fs_location *locations = fsloc->locations;
298 int i; 299 int i;
299 300
301 if (!locations)
302 return;
303
300 for (i = 0; i < fsloc->locations_count; i++) { 304 for (i = 0; i < fsloc->locations_count; i++) {
301 kfree(fsloc->locations[i].path); 305 kfree(locations[i].path);
302 kfree(fsloc->locations[i].hosts); 306 kfree(locations[i].hosts);
303 } 307 }
304 kfree(fsloc->locations); 308
309 kfree(locations);
310 fsloc->locations = NULL;
305} 311}
306 312
307static void svc_export_put(struct kref *ref) 313static void svc_export_put(struct kref *ref)