From c88da1f3d24c89cd80b2418a2c6cfe40567fd67e Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 28 Jun 2011 07:08:38 +0000 Subject: src/undo.c: undo_insert_text_cb(): removed alloca() call. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2917 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 1 + src/undo.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3cf556b5..a60476fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * src/foldersel.c: removed alloca() calls. * src/account_dialog.c: account_open(): removed alloca() call. * src/folderview.c: removed alloca() calls. + * src/undo.c: undo_insert_text_cb(): removed alloca() call. 2011-06-24 diff --git a/src/undo.c b/src/undo.c index af233e44..0a6a87c0 100644 --- a/src/undo.c +++ b/src/undo.c @@ -589,9 +589,10 @@ void undo_insert_text_cb(GtkTextBuffer *textbuf, GtkTextIter *iter, pos = gtk_text_iter_get_offset(iter); - Xstrndup_a(text_to_insert, new_text, new_text_length, return); + text_to_insert = g_strndup(new_text, new_text_length); undo_add(text_to_insert, pos, pos + g_utf8_strlen(text_to_insert, -1), UNDO_ACTION_INSERT, undostruct); + g_free(text_to_insert); } void undo_delete_text_cb(GtkTextBuffer *textbuf, GtkTextIter *start, -- cgit v1.2.3