From 2d02a0f3bda014175077a3f9489e07a37804c919 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 26 Nov 2011 20:10:52 -0800 Subject: [PATCH] Removed guac_instruction_free_data() --- libguac/src/protocol.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libguac/src/protocol.c b/libguac/src/protocol.c index e80d94c7..1f9c7345 100644 --- a/libguac/src/protocol.c +++ b/libguac/src/protocol.c @@ -541,16 +541,19 @@ guac_instruction* guac_protocol_expect_instruction(guac_socket* socket, int usec } -void guac_instruction_free_data(guac_instruction* instruction) { - free(instruction->opcode); - - if (instruction->argv) - free(instruction->argv); -} void guac_instruction_free(guac_instruction* instruction) { - guac_instruction_free_data(instruction); + + /* Free opcode */ + free(instruction->opcode); + + /* Free argv if set (may be NULL of argc is 0) */ + if (instruction->argv) + free(instruction->argv); + + /* Free instruction */ free(instruction); + }