[sr-dev] git:master:5c883b5f: core: pvapi - added free_pvname_list()
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jul 21 08:58:39 CEST 2017
Module: kamailio
Branch: master
Commit: 5c883b5ff70ad24befd5191be41502e6e35fec88
URL: https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e6e35fec88
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-21T08:44:37+02:00
core: pvapi - added free_pvname_list()
---
Modified: src/core/pvapi.c
Modified: src/core/pvar.h
---
Diff: https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e6e35fec88.diff
Patch: https://github.com/kamailio/kamailio/commit/5c883b5ff70ad24befd5191be41502e6e35fec88.patch
---
diff --git a/src/core/pvapi.c b/src/core/pvapi.c
index 93f07a5755..2f85783ea4 100644
--- a/src/core/pvapi.c
+++ b/src/core/pvapi.c
@@ -1470,6 +1470,19 @@ pvname_list_t* parse_pvname_list(str *in, unsigned int type)
return NULL;
}
+/**
+ *
+ */
+void free_pvname_list(pvname_list_t* head)
+{
+ pvname_list_t* al;
+
+ while(head) {
+ al = head;
+ head=head->next;
+ pkg_free(al);
+ }
+}
/** destroy the content of pv_spec_t structure.
diff --git a/src/core/pvar.h b/src/core/pvar.h
index b82198d841..62ab78267f 100644
--- a/src/core/pvar.h
+++ b/src/core/pvar.h
@@ -201,6 +201,7 @@ typedef struct pv_spec_list {
} pv_spec_list_t, *pv_spec_list_p;
pvname_list_t* parse_pvname_list(str *in, unsigned int type);
+void free_pvname_list(pvname_list_t* head);
int register_pvars_mod(char *mod_name, pv_export_t *items);
int pv_free_extra_list(void);
More information about the sr-dev
mailing list