You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/01/12 11:09:39 UTC

[incubator-nuttx-apps] branch master updated: netutils/ftpd/ftpd.c: Fix an error introduced in PR10. In error clean-up, it was trying to free memory on an error where we failed allocated memory. Not good.

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 561fc02  netutils/ftpd/ftpd.c:  Fix an error introduced in PR10.  In error clean-up, it was trying to free memory on an error where we failed allocated memory.  Not good.
561fc02 is described below

commit 561fc02ae58172680088c840b5b70db243230163
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Jan 11 19:40:57 2020 -0600

    netutils/ftpd/ftpd.c:  Fix an error introduced in PR10.  In error clean-up, it was trying to free memory on an error where we failed allocated memory.  Not good.
---
 netutils/ftpd/ftpd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c
index 602442e..3026be7 100644
--- a/netutils/ftpd/ftpd.c
+++ b/netutils/ftpd/ftpd.c
@@ -1617,8 +1617,6 @@ static int ftpd_changedir(FAR struct ftpd_session_s *session,
                      (FAR char **)(&workpath));
   if (ret < 0)
     {
-      free(workpath);
-      free(abspath);
       ftpd_response(session->cmd.sd, session->txtimeout,
                     g_respfmt1, 550, ' ',
                     "Can not change directory !");