$OpenBSD: patch-src_nettool_c,v 1.5 2012/03/29 06:58:10 ajacoutot Exp $
--- src/nettool.c.orig	Tue Jan  3 10:38:09 2012
+++ src/nettool.c	Wed Mar 28 09:44:06 2012
@@ -410,6 +410,10 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
 						 	len, NULL);
 			}
 
+			g_free (text);
+
+			return TRUE;
+
 		} else if (status == G_IO_STATUS_AGAIN) {
 			char buf[1];
 
@@ -421,6 +425,8 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
 				}
 				g_string_append_c (netinfo->command_output, buf[0]);
 			}
+			g_free (text);
+			return TRUE;
 		} else if (status == G_IO_STATUS_EOF) {
 			
 		} else if (status == G_IO_STATUS_ERROR) {
@@ -438,15 +444,15 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
 
 			} else {
 				g_warning ("Error: %s\n", err->message);
-				g_free (text);
 				g_free (err);
 			}
 
+			g_free (text);
+			return TRUE;
+
 		}
 
 		g_free (text);
-
-		return TRUE;
 	}
 
 	/* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so
