diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-10-25 16:30:38 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-10-25 16:30:38 +0000 |
| commit | 9a669d88e29de2f25532688b494580a48f8a31b8 (patch) | |
| tree | ecb7c4fe51c0fd92b00f73db02f228bc91c0e736 /index.c | |
| parent | 58b8771ff9a9c397ea49605db216a5e5a777c057 (diff) | |
| download | halibut-9a669d88e29de2f25532688b494580a48f8a31b8.zip halibut-9a669d88e29de2f25532688b494580a48f8a31b8.tar.gz halibut-9a669d88e29de2f25532688b494580a48f8a31b8.tar.bz2 halibut-9a669d88e29de2f25532688b494580a48f8a31b8.tar.xz | |
Fix yet another error-handling segfault
[originally from svn r257]
Diffstat (limited to 'index.c')
| -rw-r--r-- | index.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -75,6 +75,11 @@ void index_merge(index *idx, int is_explicit, wchar_t *tags, word *text) { existing = add23(idx->tags, t, compare_tags); if (existing == t) { /* + * Duplicate this so we can free it independently. + */ + t->name = ustrdup(tags); + + /* * Every tag has an implicit \IM. So if this tag * doesn't exist and we're explicit, then we should * warn (and drop it, since it won't be referenced). @@ -83,10 +88,10 @@ void index_merge(index *idx, int is_explicit, wchar_t *tags, word *text) { error(err_nosuchidxtag, tags); continue; } + /* * Otherwise, this is a new tag with an implicit \IM. */ - t->name = ustrdup(tags); t->implicit_text = text; } else { sfree(t); |