diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:50:54 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 19:50:54 -0500 |
commit | afe947555b59c38e521d588e3e4ba96a9b764ff4 (patch) | |
tree | 88106a6ecaf23dfa95531534c025c0b4fbe31b88 /gpib.c | |
parent | 8f433cde879a40fc96f295bfa35e5869781adc5d (diff) |
remember to free gpib output string
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 */ |