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,7 +37,7 @@ | ||
37 | #include <glib/gi18n.h> | 37 | #include <glib/gi18n.h> |
38 | 38 | ||
39 | #include <pw3270.h> | 39 | #include <pw3270.h> |
40 | - #include <malloc.h> | 40 | +// #include <malloc.h> |
41 | #include "v3270.h" | 41 | #include "v3270.h" |
42 | #include "private.h" | 42 | #include "private.h" |
43 | #include "accessible.h" | 43 | #include "accessible.h" |
@@ -393,7 +393,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse | @@ -393,7 +393,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse | ||
393 | g_error_free(error); | 393 | g_error_free(error); |
394 | } | 394 | } |
395 | 395 | ||
396 | - free(text); | 396 | + lib3270_free(text); |
397 | return utfchar; | 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,7 +432,7 @@ static gchar * v3270_accessible_get_text(AtkText *atk_text, gint start_pos, gint | ||
432 | g_error_free(error); | 432 | g_error_free(error); |
433 | } | 433 | } |
434 | 434 | ||
435 | - free(text); | 435 | + lib3270_free(text); |
436 | 436 | ||
437 | // trace("%s:\n%s\n",__FUNCTION__,utftext); | 437 | // trace("%s:\n%s\n",__FUNCTION__,utftext); |
438 | 438 |
iocallback.c
@@ -43,9 +43,9 @@ | @@ -43,9 +43,9 @@ | ||
43 | #include <glib.h> | 43 | #include <glib.h> |
44 | #include "../globals.h" | 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 | static int static_CallAndWait(int(*callback)(H3270 *session, void *), H3270 *session, void *parm); | 50 | static int static_CallAndWait(int(*callback)(H3270 *session, void *), H3270 *session, void *parm); |
51 | static void * static_AddInput(int source, H3270 *session, void (*fn)(H3270 *session)); | 51 | static void * static_AddInput(int source, H3270 *session, void (*fn)(H3270 *session)); |
selection.c
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | 29 | ||
30 | #include <gtk/gtk.h> | 30 | #include <gtk/gtk.h> |
31 | #include <pw3270.h> | 31 | #include <pw3270.h> |
32 | - #include <malloc.h> | 32 | +// #include <malloc.h> |
33 | #include "v3270.h" | 33 | #include "v3270.h" |
34 | #include "private.h" | 34 | #include "private.h" |
35 | #include <lib3270/selection.h> | 35 | #include <lib3270/selection.h> |
@@ -92,7 +92,7 @@ gchar * v3270_get_text(GtkWidget *widget, int offset, int len) | @@ -92,7 +92,7 @@ gchar * v3270_get_text(GtkWidget *widget, int offset, int len) | ||
92 | 92 | ||
93 | text = g_convert(str, -1, "UTF-8", lib3270_get_charset(terminal->host), NULL, NULL, NULL); | 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 | return text; | 96 | return text; |
97 | } | 97 | } |
98 | 98 | ||
@@ -110,7 +110,7 @@ static gchar * v3270_get_selected(v3270 *widget) | @@ -110,7 +110,7 @@ static gchar * v3270_get_selected(v3270 *widget) | ||
110 | if(text) | 110 | if(text) |
111 | { | 111 | { |
112 | gchar *str = g_strdup(text); | 112 | gchar *str = g_strdup(text); |
113 | - free(text); | 113 | + lib3270_free(text); |
114 | return str; | 114 | return str; |
115 | } | 115 | } |
116 | return NULL; | 116 | return NULL; |
@@ -255,7 +255,7 @@ const gchar * v3270_copy_append(GtkWidget *widget) | @@ -255,7 +255,7 @@ const gchar * v3270_copy_append(GtkWidget *widget) | ||
255 | 255 | ||
256 | text = g_convert(str, -1, "UTF-8", lib3270_get_charset(terminal->host), NULL, NULL, NULL); | 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 | clip = g_strconcat(terminal->clipboard,"\n",text,NULL); | 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,7 +462,7 @@ gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboole | ||
462 | 462 | ||
463 | utftext = g_convert(str, -1, "UTF-8", lib3270_get_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | 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 | return utftext; | 467 | return utftext; |
468 | } | 468 | } |