+2011-02-22 Chris Allegretta <chrisa@asty.org>
+ * color.c (nfreeregex): Fix that we were trying to set the pointer passed by value
+ to NULL. Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune.
+
2011-02-18 Chris Allegretta <chrisa@asty.org>
* New saved cursor position history option. Command line option -P or --poslog, rc file
entry "poslog". Search history changes to ~/.nano/search_history, cursor position log
4.15 discussing the change and offering an interoperability workaround.
* files.c (load_history): Set last_search to the last search value we loaded from history,
so do_research will succeed without needing to manually load the last seach in. Fixes
- bug reported by Matt "ML" at gmail.
+ bug reported by Matthieu Lejeune.
2011-02-12 Chris Allegretta <chrisa@asty.org>
* Initial libmagic implementation, adapted from Eitan Adler <eitanadlerlist@gmail.com>.
}
/* Cleanup a regex we previously compiled */
-void nfreeregex(regex_t *r)
+void nfreeregex(regex_t **r)
{
assert(r != NULL);
- regfree(r);
- free(r);
- r = NULL;
+ regfree(*r);
+ free(*r);
+ *r = NULL;
}
/* Update the color information based on the current filename. */
/* Decompile e->ext_regex's specified regex if we aren't
* going to use it. */
if (not_compiled)
- nfreeregex(e->ext);
+ nfreeregex(&e->ext);
}
}
}
if (not_compiled)
- nfreeregex(e->ext);
+ nfreeregex(&e->ext);
}
}
}
/* Decompile e->ext_regex's specified regex if we aren't
* going to use it. */
if (not_compiled)
- nfreeregex(e->ext);
+ nfreeregex(&e->ext);
}
}
}