DBG(FS, ul_debugobj(fs, "free [refcount=%d]", fs->refcount));
- mnt_unref_optlist(fs->optlist);
-
mnt_reset_fs(fs);
free(fs);
}
free(fs->opt_fields);
free(fs->comment);
+ mnt_unref_optlist(fs->optlist);
+ fs->optlist = NULL;
+
fs->opts_age = 0;
memset(fs, 0, sizeof(*fs));
* set, then the field is NOT overwritten.
*
* This function does not copy userdata (se mnt_fs_set_userdata()). A new copy is
- * not linked with any existing mnt_tab.
+ * not linked with any existing mnt_tab or optlist.
*
* Returns: @dest or NULL in case of error
*/
dest->usedsize = src->usedsize;
dest->priority = src->priority;
- dest->opts_age = src->opts_age;
- dest->optlist = src->optlist;
- mnt_ref_optlist(dest->optlist);
-
return dest;
err:
if (!org)