Type: fix
policer_add_del does not free "clib_error_t*" when it is not null.
Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: I00ad8e53797e46adeb1819856262bb9f3c068c63
error = policer_add_del (vm, name, &cfg, &policer_index, mp->is_add);
if (error)
error = policer_add_del (vm, name, &cfg, &policer_index, mp->is_add);
if (error)
- rv = VNET_API_ERROR_UNSPECIFIED;
+ {
+ rv = VNET_API_ERROR_UNSPECIFIED;
+ clib_error_free (error);
+ }
/* *INDENT-OFF* */
REPLY_MACRO2(VL_API_POLICER_ADD_DEL_REPLY,
/* *INDENT-OFF* */
REPLY_MACRO2(VL_API_POLICER_ADD_DEL_REPLY,