Fix memory leak after getting environment from PAM

       The format of the memory is a malloc()´d array of char pointers, the last element of
       which is set to NULL. Each of the non-NULL entries in this array point to a NUL
       terminated and malloc()´d char string of the form: "name=value".