[PATCH nft 2/3] parser: remove "const" from argument of input_descriptor_destroy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not a const pointer, as the destroy() function clearly
modifies/free is. Drop the const from the argument of
input_descriptor_destroy().

Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>
---
 src/scanner.l | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/scanner.l b/src/scanner.l
index 00a09485d420..31284d7358fa 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1258,11 +1258,11 @@ void *scanner_init(struct parser_state *state)
 	return scanner;
 }
 
-static void input_descriptor_destroy(const struct input_descriptor *indesc)
+static void input_descriptor_destroy(struct input_descriptor *indesc)
 {
 	if (indesc->name)
 		free_const(indesc->name);
-	free_const(indesc);
+	free(indesc);
 }
 
 static void input_descriptor_list_destroy(struct parser_state *state)
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux