From 76c95bfc9033167fa692172360000df853b2a094 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 8 Mar 2011 14:24:30 +0100 Subject: examples/client-blocking: pull out the error before freeing conn. --- lib/examples/client-blocking.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/examples/client-blocking.c') diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c index ef361e5..15152b6 100644 --- a/lib/examples/client-blocking.c +++ b/lib/examples/client-blocking.c @@ -21,6 +21,7 @@ blocking_client (const char *av1, const char *av2, int use_request_object_flag) struct rs_connection *conn = NULL; struct rs_request *request = NULL; struct rs_packet *req = NULL, *resp = NULL; + struct rs_error *err = NULL; if (rs_context_create (&h, "/usr/share/freeradius/dictionary")) return NULL; @@ -71,6 +72,7 @@ blocking_client (const char *av1, const char *av2, int use_request_object_flag) fprintf (stderr, "%s: no response\n", __func__); cleanup: + err = rs_err_conn_pop (conn); if (resp) rs_packet_destroy (resp); if (req) @@ -82,7 +84,7 @@ blocking_client (const char *av1, const char *av2, int use_request_object_flag) if (h) rs_context_destroy (h); - return rs_err_conn_pop (conn); + return err; } int -- cgit v1.1