From 1ca783f73de655a814bf939ff8265c17fdfcb3cf Mon Sep 17 00:00:00 2001 From: klmp200 Date: Thu, 18 May 2017 01:40:26 +0200 Subject: [PATCH] 0 leak Memory mother fuckers --- fish_shell/fish_commands.c | 9 +++++---- fish_shell/fish_utils.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fish_shell/fish_commands.c b/fish_shell/fish_commands.c index 039d684..7c3e40d 100644 --- a/fish_shell/fish_commands.c +++ b/fish_shell/fish_commands.c @@ -37,12 +37,12 @@ int fishCd(WordArray *args) { perror("fish"); } } - return 0; + freeWordArray(args); + return EXIT_SUCCESS; } int fishHelp(WordArray *args) { int i; - args->size = args->size; printf("Bartuccio Antoine, Amalvy Arthur, Yann Chevanton\n"); printf("Tape tes putains de noms de programmes et tes arguments de merde et tabasse ENTER !\n"); printf("Les commandes suivantes sont internes :\n"); @@ -50,11 +50,12 @@ int fishHelp(WordArray *args) { printf("\t%s\n", builtinCommandsStr[i]); } printf("Et sinon pour le reste, RTFM !"); - return 0; + freeWordArray(args); + return EXIT_SUCCESS; } int fishExit(WordArray *args) { - args->size = args->size; + freeWordArray(args); return EXIT_SIGNAL; } diff --git a/fish_shell/fish_utils.c b/fish_shell/fish_utils.c index 078bd20..9876aff 100644 --- a/fish_shell/fish_utils.c +++ b/fish_shell/fish_utils.c @@ -30,7 +30,7 @@ char *getInsult(){ int picked = 0; char *insults[] = { (char *) "Apprend à écrire crétin !", - (char *) "Bolos !", + (char *) "Boloss !", (char *) "Mois aussi je sais écrire de la merde, pourtant je le fait pas !", (char *) "Oh ! Une erreur ! Comme ta vie en fait...", (char *) "Nul !",