vici: Use silent builder destroy function in vici_free_req()
authorMartin Willi <martin@revosec.ch>
Fri, 12 Dec 2014 09:07:31 +0000 (10:07 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 12 Dec 2014 09:23:59 +0000 (10:23 +0100)
src/libcharon/plugins/vici/libvici.c

index c0205cc..7c98c8b 100644 (file)
@@ -427,14 +427,8 @@ vici_res_t* vici_submit(vici_req_t *req, vici_conn_t *conn)
 
 void vici_free_req(vici_req_t *req)
 {
-       vici_message_t *message;
-
        free(req->name);
-       message = req->b->finalize(req->b);
-       if (message)
-       {
-               message->destroy(message);
-       }
+       req->b->destroy(req->b);
        free(req);
 }