summaryrefslogtreecommitdiff
path: root/gpib.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:50:54 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:50:54 -0500
commitafe947555b59c38e521d588e3e4ba96a9b764ff4 (patch)
tree88106a6ecaf23dfa95531534c025c0b4fbe31b88 /gpib.c
parent8f433cde879a40fc96f295bfa35e5869781adc5d (diff)
remember to free gpib output string
Diffstat (limited to 'gpib.c')
-rw-r--r--gpib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gpib.c b/gpib.c
index 2277b7a..2d9d608 100644
--- a/gpib.c
+++ b/gpib.c
@@ -784,7 +784,11 @@ int GPIB_send_query_response(gpointer *ignore_this, char *in_string)
queue_error_for_gpib_only(query_error_interrupted);
}
- gchar *out_buffer = g_strdup_printf ("%s\n", in_string);
+ // needs to be freed
+ gchar *term_string = g_strdup_printf ("%s\n", in_string);
+
+ // just a pointer
+ char *out_buffer = term_string;
/* message must be available if this function has been called */
@@ -875,6 +879,8 @@ int GPIB_send_query_response(gpointer *ignore_this, char *in_string)
INTERFACE_STATUS|=UCMPL; /* Set the user complete bit */
+ g_free (term_string);
+
if (INTERFACE_STATUS&DCAS) {
TNT_4882_Status(STB,0x10,CLEAR); /* Clear MAV bit */