@@ -173,7 +173,6 @@ struct export_features {
struct export_features *get_export_features(void);
void fix_pseudoflavor_flags(struct exportent *ep);
-void exportent_free_realpath(struct exportent*);
char *exportent_realpath(struct exportent *eep);
int export_test(struct exportent *eep, int with_fsid);
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
@@ -67,6 +67,12 @@ static void freesquash(void);
static void syntaxerr(char *msg);
static struct flav_info *find_flavor(char *name);
+static void
+exportent_free_realpath(struct exportent* eep){
+ if (eep->e_realpath && eep->e_realpath != eep->e_path)
+ free(eep->e_realpath);
+};
+
void
setexportent(char *fname, char *type)
{
@@ -191,7 +197,7 @@ getexportent(int fromkernel)