PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: Argv Realloc Problems
Date: Tuesday, 29 Sep 2020, 20:38:22


    > I am currently working on freeing memory. I am currently freeing the char*
    > line argument before returning, which causes errors. ...

You may not free() the argument to parse() since it
will be free()-ed after parse() returns to main().
=====

    >                                                 ...  At the same time, when
    > I don't, and CTRL-C out of the prompt, valgrind complains that it's not
    > freed.

You should either put the input in a file and redirect the
stdin for parsley to that file, or type CTRL-D to signify
that there is no more input.

--Stan-
PREV INDEX NEXT