loudmouth/lm-connection.c
changeset 259 17c0fe07536c
parent 258 b67af7fc111f
child 260 bdf166b3fa9c
equal deleted inserted replaced
258:b67af7fc111f 259:17c0fe07536c
   508 			
   508 			
   509 			(* ((LmResultFunction) cb->func)) (connection, FALSE,
   509 			(* ((LmResultFunction) cb->func)) (connection, FALSE,
   510 							   cb->user_data);
   510 							   cb->user_data);
   511 			_lm_utils_free_callback (cb);
   511 			_lm_utils_free_callback (cb);
   512 		}
   512 		}
   513 		
       
   514 		/* If the user callback called connection_close(), this is
       
   515 		 * already freed */
       
   516 		if (connection->connect_data) {
       
   517 			freeaddrinfo (connect_data->resolved_addrs);
       
   518 			connection->connect_data = NULL;
       
   519 			g_free (connect_data);
       
   520 		}
       
   521 	} else {
   513 	} else {
   522 		/* try to connect to the next host */
   514 		/* try to connect to the next host */
   523 		connection_do_connect (connect_data);
   515 		connection_do_connect (connect_data);
   524 	}
   516 	}
   525 }
   517 }