Commit 5cef9960b5b4516c107440dc3c5efd3fe8b7fe58
1 parent
b83e5747
Exists in
master
and in
1 other branch
Debuggando gerenciamento de memória a procura de segfaults aleatórios
Showing
3 changed files
with
11 additions
and
11 deletions
Show diff stats
accessible.c
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | #include <glib/gi18n.h> |
| 38 | 38 | |
| 39 | 39 | #include <pw3270.h> |
| 40 | - #include <malloc.h> | |
| 40 | +// #include <malloc.h> | |
| 41 | 41 | #include "v3270.h" |
| 42 | 42 | #include "private.h" |
| 43 | 43 | #include "accessible.h" |
| ... | ... | @@ -393,7 +393,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse |
| 393 | 393 | g_error_free(error); |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | - free(text); | |
| 396 | + lib3270_free(text); | |
| 397 | 397 | return utfchar; |
| 398 | 398 | } |
| 399 | 399 | |
| ... | ... | @@ -432,7 +432,7 @@ static gchar * v3270_accessible_get_text(AtkText *atk_text, gint start_pos, gint |
| 432 | 432 | g_error_free(error); |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | - free(text); | |
| 435 | + lib3270_free(text); | |
| 436 | 436 | |
| 437 | 437 | // trace("%s:\n%s\n",__FUNCTION__,utftext); |
| 438 | 438 | ... | ... |
iocallback.c
| ... | ... | @@ -43,9 +43,9 @@ |
| 43 | 43 | #include <glib.h> |
| 44 | 44 | #include "../globals.h" |
| 45 | 45 | |
| 46 | -#ifdef HAVE_MALLOC_H | |
| 47 | - #include <malloc.h> | |
| 48 | -#endif | |
| 46 | +//#ifdef HAVE_MALLOC_H | |
| 47 | +// #include <malloc.h> | |
| 48 | +//#endif | |
| 49 | 49 | |
| 50 | 50 | static int static_CallAndWait(int(*callback)(H3270 *session, void *), H3270 *session, void *parm); |
| 51 | 51 | static void * static_AddInput(int source, H3270 *session, void (*fn)(H3270 *session)); | ... | ... |
selection.c
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | #include <gtk/gtk.h> |
| 31 | 31 | #include <pw3270.h> |
| 32 | - #include <malloc.h> | |
| 32 | +// #include <malloc.h> | |
| 33 | 33 | #include "v3270.h" |
| 34 | 34 | #include "private.h" |
| 35 | 35 | #include <lib3270/selection.h> |
| ... | ... | @@ -92,7 +92,7 @@ gchar * v3270_get_text(GtkWidget *widget, int offset, int len) |
| 92 | 92 | |
| 93 | 93 | text = g_convert(str, -1, "UTF-8", lib3270_get_charset(terminal->host), NULL, NULL, NULL); |
| 94 | 94 | |
| 95 | - free(str); | |
| 95 | + lib3270_free(str); | |
| 96 | 96 | return text; |
| 97 | 97 | } |
| 98 | 98 | |
| ... | ... | @@ -110,7 +110,7 @@ static gchar * v3270_get_selected(v3270 *widget) |
| 110 | 110 | if(text) |
| 111 | 111 | { |
| 112 | 112 | gchar *str = g_strdup(text); |
| 113 | - free(text); | |
| 113 | + lib3270_free(text); | |
| 114 | 114 | return str; |
| 115 | 115 | } |
| 116 | 116 | return NULL; |
| ... | ... | @@ -255,7 +255,7 @@ const gchar * v3270_copy_append(GtkWidget *widget) |
| 255 | 255 | |
| 256 | 256 | text = g_convert(str, -1, "UTF-8", lib3270_get_charset(terminal->host), NULL, NULL, NULL); |
| 257 | 257 | |
| 258 | - free(str); | |
| 258 | + lib3270_free(str); | |
| 259 | 259 | |
| 260 | 260 | clip = g_strconcat(terminal->clipboard,"\n",text,NULL); |
| 261 | 261 | |
| ... | ... | @@ -462,7 +462,7 @@ gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboole |
| 462 | 462 | |
| 463 | 463 | utftext = g_convert(str, -1, "UTF-8", lib3270_get_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); |
| 464 | 464 | |
| 465 | - free(str); | |
| 465 | + lib3270_free(str); | |
| 466 | 466 | |
| 467 | 467 | return utftext; |
| 468 | 468 | } | ... | ... |