diff --git a/Digby_Real_Estate/Fundamentals/most_frequent.c b/Digby_Real_Estate/Fundamentals/most_frequent.c index 64e492f..d5f83f8 100644 --- a/Digby_Real_Estate/Fundamentals/most_frequent.c +++ b/Digby_Real_Estate/Fundamentals/most_frequent.c @@ -61,8 +61,10 @@ char most_frequent(const char *str){ (*(values + 2)) ++; } + char rslt = *cha; free(values); - return *cha; + free(cha); + return rslt; } /* int main () { diff --git a/Digby_Real_Estate/Fundamentals/my_weirddup.c b/Digby_Real_Estate/Fundamentals/my_weirddup.c index 533b4db..319d62c 100644 --- a/Digby_Real_Estate/Fundamentals/my_weirddup.c +++ b/Digby_Real_Estate/Fundamentals/my_weirddup.c @@ -57,7 +57,7 @@ int main(int args ,char **arg){ rslt = my_weirddup(ic); if (rslt != NULL){ - printf("%s\n", rslt); + printf("%s ; %s\n", ic ,rslt); free(rslt); } free(ic);