Skip to contentSkip to conversation

master - man_generator: release buffer after use

PATCH Zdenek Kabelac 1 participant 1 message Jun 30, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3d08b0971f5f2610459343d0ae2a524d272142d2
Commit:        3d08b0971f5f2610459343d0ae2a524d272142d2
Parent:        ad286a32275283f018adabbf96d569d5c1fd065a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jun 30 19:36:24 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jun 30 20:39:02 2017 +0200

man_generator: release buffer after use

Although ATM this code has no memory management at all, it will not make any harm to release some memory, when it's not needed anymore.

---
 tools/command.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/command.c +1 -0
index afd8831..c094f12 100644
@@ -2279,6 +2279,7 @@ static void print_val_man(struct command_name *cname, int opt_enum, int val_enum
 			else
 				printf("\\fB%s\\fP", line_argv[i]);
 		}
+		dm_free(line);
 		return;
 	}