Commit 39bcda5c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use VSB_destroy() where applicable.

parent a016850f
...@@ -306,7 +306,7 @@ barrier_sock_sync(struct barrier *b, struct vtclog *vl) ...@@ -306,7 +306,7 @@ barrier_sock_sync(struct barrier *b, struct vtclog *vl)
vtc_fatal(vl, "Barrier(%s) connection failed: %s", vtc_fatal(vl, "Barrier(%s) connection failed: %s",
b->name, err); b->name, err);
VSB_delete(vsb); VSB_destroy(&vsb);
/* emulate pthread_cond_wait's behavior */ /* emulate pthread_cond_wait's behavior */
AZ(pthread_mutex_unlock(&b->mtx)); AZ(pthread_mutex_unlock(&b->mtx));
......
...@@ -225,7 +225,7 @@ client_thread(void *priv) ...@@ -225,7 +225,7 @@ client_thread(void *priv)
vsb = macro_expand(vl, c->connect); vsb = macro_expand(vl, c->connect);
AN(vsb); AN(vsb);
#if !defined(__sun) #if !defined(__sun)
pthread_cleanup_push((void (*)(void *))VSB_delete, vsb); pthread_cleanup_push((void (*)(void *))VSB_destroy, &vsb);
#endif #endif
c->addr = VSB_data(vsb); c->addr = VSB_data(vsb);
...@@ -252,7 +252,7 @@ client_thread(void *priv) ...@@ -252,7 +252,7 @@ client_thread(void *priv)
pthread_cleanup_pop(0); pthread_cleanup_pop(0);
#endif #endif
pthread_cleanup_pop(0); pthread_cleanup_pop(0);
VSB_delete(vsb); VSB_destroy(&vsb);
vtc_logclose(vl); vtc_logclose(vl);
return (NULL); return (NULL);
} }
......
...@@ -129,6 +129,6 @@ vtc_send_proxy(int fd, int version, const struct suckaddr *sac, ...@@ -129,6 +129,6 @@ vtc_send_proxy(int fd, int version, const struct suckaddr *sac,
AZ(VSB_finish(vsb)); AZ(VSB_finish(vsb));
i = VSB_tofile(vsb, fd); i = VSB_tofile(vsb, fd);
VSB_delete(vsb); VSB_destroy(&vsb);
return (i); return (i);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment