Clear a draw_text_context_t during wipe()

This fixes a bug where pango was called with already-freed arguments because
wipe() didn't zero out those variables and a later init() failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-16 19:52:42 +02:00
parent 5487906487
commit 94a0349c62
1 changed files with 1 additions and 0 deletions

1
draw.h
View File

@ -161,6 +161,7 @@ draw_text_context_wipe(draw_text_context_t *pdata)
if(pdata->attr_list) if(pdata->attr_list)
pango_attr_list_unref(pdata->attr_list); pango_attr_list_unref(pdata->attr_list);
p_delete(&pdata->text); p_delete(&pdata->text);
p_clear(pdata, 1);
} }
} }