diff options
author | paul <paul> | 2005-10-26 05:05:16 +0000 |
---|---|---|
committer | paul <paul> | 2005-10-26 05:05:16 +0000 |
commit | 0241684ea77e8aa20ad2cb3903589559f4a7b009 (patch) | |
tree | 2bb64a53f5d8c1091839be9e1afb6e4625828f38 /lib/routemap.c | |
parent | 216565ab68148d3161422c0d73730614bfeccd7c (diff) |
2005-10-26 Paul Jakma <paul.jakma@sun.com>
* (general) Cleanup a some calls to XFREE,strdup, etc. to use
the memory.h macros.
* memtypes.c: Add MTYPE_IF_RMAP_NAME, MTYPE_PQUEUE,
MTYPE_PQUEUE_DATA and MTYPE_HOST.
* memtypes.h: update auto-built file.
* if_rmap.c: Use MTYPE_IF_RMAP_NAME.
* pqueue.c: Use the two MTYPE_PQUEUE mtypes for allocations.
Diffstat (limited to 'lib/routemap.c')
-rw-r--r-- | lib/routemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index a9d94f27..85491ead 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -314,7 +314,7 @@ route_map_index_delete (struct route_map_index *index, int notify) /* Free 'char *nextrm' if not NULL */ if (index->nextrm) - free (index->nextrm); + XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm); /* Execute event hook. */ if (route_map_master.event_hook && notify) @@ -1175,8 +1175,8 @@ DEFUN (rmap_call, if (index) { if (index->nextrm) - free (index->nextrm); - index->nextrm = strdup (argv[0]); + XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm); + index->nextrm = XSTRDUP (MTYPE_ROUTE_MAP_NAME, argv[0]); } return CMD_SUCCESS; } @@ -1193,7 +1193,7 @@ DEFUN (no_rmap_call, if (index->nextrm) { - free (index->nextrm); + XFREE (MTYPE_ROUTE_MAP_NAME, index->nextrm); index->nextrm = NULL; } |