diff --git a/fs/hmdfs/super.c b/fs/hmdfs/super.c index 52cc857f5e45f55a874d219d673b35cfcc97c73e..a4b1170153b373030b2fc070ebd0a2f5d342d86e 100644 --- a/fs/hmdfs/super.c +++ b/fs/hmdfs/super.c @@ -63,6 +63,8 @@ static int hmdfs_match_strdup(const substring_t *s, char **dst) if (!dup) return -ENOMEM; + if (*dst) + kfree(*dst); *dst = dup; return 0;