From 3621746545555aefa5aa0c6d479039f994131595 Mon Sep 17 00:00:00 2001 From: "David M. Syzdek" Date: Thu, 26 May 2022 20:08:51 -0800 Subject: libtinytac: adding tinytac_tinytac_free_budps() --- lib/libtinytac/libtinytac.h | 1 + lib/libtinytac/lmemory.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/libtinytac/libtinytac.h b/lib/libtinytac/libtinytac.h index 6554e94..db44183 100644 --- a/lib/libtinytac/libtinytac.h +++ b/lib/libtinytac/libtinytac.h @@ -111,6 +111,7 @@ struct _tinytac { TinyTacObj obj; char * hosts; + BindleURLDesc ** budps; char ** keys; unsigned opts; unsigned opts_neg; diff --git a/lib/libtinytac/lmemory.c b/lib/libtinytac/lmemory.c index 2259e23..983d903 100644 --- a/lib/libtinytac/lmemory.c +++ b/lib/libtinytac/lmemory.c @@ -81,6 +81,11 @@ tinytac_tinytac_free( TinyTac * tt ); +static void +tinytac_tinytac_free_budps( + BindleURLDesc ** budps ); + + static int tinytac_set_option_flag( TinyTac * tt, @@ -150,6 +155,8 @@ tinytac_tinytac_free( if ((tt->keys)) tinytacb_strsfree(tt->keys); + tinytac_tinytac_free_budps(tt->budps); + memset(tt, 0, sizeof(TinyTac)); free(tt); @@ -157,6 +164,20 @@ tinytac_tinytac_free( } +void +tinytac_tinytac_free_budps( + BindleURLDesc ** budps ) +{ + size_t pos; + if (!(budps)) + return; + for(pos = 0; ((budps[pos])); pos++) + tinytacb_urldesc_free(budps[pos]); + free(budps); + return; +} + + int tinytac_get_option( TinyTac * tt, -- cgit v1.2.3