diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/plist.c | 4 | ||||
| -rw-r--r-- | lib/sockopt.c | 4 | ||||
| -rw-r--r-- | lib/sockopt.h | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/plist.c b/lib/plist.c index 2b93d880f6..6f19565688 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -328,6 +328,9 @@ prefix_list_get (afi_t afi, int orf, const char *name) return plist; } +static void prefix_list_trie_del (struct prefix_list *plist, + struct prefix_list_entry *pentry); + /* Delete prefix-list from prefix_list_master and free it. */ static void prefix_list_delete (struct prefix_list *plist) @@ -341,6 +344,7 @@ prefix_list_delete (struct prefix_list *plist) for (pentry = plist->head; pentry; pentry = next) { next = pentry->next; + prefix_list_trie_del (plist, pentry); prefix_list_entry_free (pentry); plist->count--; } diff --git a/lib/sockopt.c b/lib/sockopt.c index 570b575a7a..e661b4cc56 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -31,9 +31,9 @@ /* Replace the path of given defaultpath with newpath, but keep filename */ void -set_socket_path (char *path, char *defaultpath, char *newpath, int maxsize) +set_socket_path (char *path, const char *defaultpath, char *newpath, int maxsize) { - char *sock_name; + const char *sock_name; sock_name = strrchr(defaultpath, '/'); if (sock_name) diff --git a/lib/sockopt.h b/lib/sockopt.h index 8e7895dd6f..7e1bd62446 100644 --- a/lib/sockopt.h +++ b/lib/sockopt.h @@ -25,7 +25,8 @@ #include "sockunion.h" /* Override (vty) socket paths, but keep the filename */ -extern void set_socket_path (char *path, char *defaultpath, char *newpath, int maxsize); +extern void set_socket_path (char *path, const char *defaultpath, + char *newpath, int maxsize); extern void setsockopt_so_recvbuf (int sock, int size); extern void setsockopt_so_sendbuf (const int sock, int size); |
