projects
/
radsecproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d464ebb
)
examples/client-blocking: pull out the error before freeing conn.
author
Linus Nordberg
<linus@nordu.net>
Tue, 8 Mar 2011 13:24:30 +0000
(14:24 +0100)
committer
Linus Nordberg
<linus@nordu.net>
Tue, 8 Mar 2011 13:24:30 +0000
(14:24 +0100)
lib/examples/client-blocking.c
patch
|
blob
|
history
diff --git
a/lib/examples/client-blocking.c
b/lib/examples/client-blocking.c
index
ef361e5
..
15152b6
100644
(file)
--- 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