aboutsummaryrefslogtreecommitdiff
path: root/src/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/info.c b/src/info.c
index 0fa66fe..3f79736 100644
--- a/src/info.c
+++ b/src/info.c
@@ -8,14 +8,15 @@ void info_handler(struct player_t *player)
struct stock_t *stock = find_stock(player, sym);
- free(sym);
-
if(!stock)
{
printf("Couldn't find '%s' in portfolio.\n", sym);
+ free(sym);
return;
}
+ free(sym);
+
printf("Transaction history:\n");
print_history(stock);
}