diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:03:23 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:03:23 -0500 |
commit | 8c63fc997dbfa0e6268537482df97d0fa744010a (patch) | |
tree | 02cbdb13a198fbab873e4a54d9b6fd16337784a6 /gpib.c | |
parent | 401025aebc02eca587474e094fa50b2939f8a147 (diff) |
set output string pointer to NULL after freeing it
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -635,8 +635,9 @@ int GPIB_check_for_device_clear_signal(void) TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit g_free (globals.Registers.pending_output_message); + globals.Registers.pending_output_message = NULL; - TNT_Holdoff_off(); + TNT_Holdoff_off(); TNT_INT_STATUS(); return TRUE; @@ -788,6 +789,7 @@ void GPIB_start_query_response(gpointer *ignore_this, char *in_string) if (globals.Registers.pending_output_message != NULL) { queue_error_for_gpib_only(query_error_interrupted); g_free (globals.Registers.pending_output_message); + globals.Registers.pending_output_message = NULL; } globals.Registers.pending_output_message = g_strdup_printf ("%s\n", in_string); @@ -798,8 +800,8 @@ void GPIB_start_query_response(gpointer *ignore_this, char *in_string) void GPIB_finish_query_response() { if (!globals.HWDetect.gpib) { - return; - } + return; + } if (globals.Registers.pending_output_message == NULL) { return; @@ -888,6 +890,7 @@ void GPIB_finish_query_response() INTERFACE_STATUS|=UCMPL; // Set the user complete bit g_free (globals.Registers.pending_output_message); + globals.Registers.pending_output_message = NULL; if (GPIB_check_for_device_clear_signal()) { return; |