summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-08 14:24:30 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-08 14:24:30 +0100
commit76c95bfc9033167fa692172360000df853b2a094 (patch)
treeccec64a320b6d099d52eea9df749bc899acdc9f2 /lib
parentd464ebb9235fe78e6588e95d4d3333d5ee95ca48 (diff)
examples/client-blocking: pull out the error before freeing conn.
Diffstat (limited to 'lib')
-rw-r--r--lib/examples/client-blocking.c4
1 files changed, 3 insertions, 1 deletions
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