* cmds.c (globulize): Use correct address of globbed results when
authorKen Raeburn <raeburn@mit.edu>
Tue, 21 Nov 2000 23:32:47 +0000 (23:32 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 21 Nov 2000 23:32:47 +0000 (23:32 +0000)
freeing storage.  Patch from Nalin Dahyabhai <nalin@redhat.com>.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12869 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftp/ChangeLog
src/appl/gssftp/ftp/cmds.c

index 7b84be3b8926ad79bab2deb9e65b9386d7f37c37..43034a5f0d053f66e731a525c57f8aad01c9513a 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-21  Ken Raeburn  <raeburn@mit.edu>
+
+       * cmds.c (globulize): Use correct address of globbed results when
+       freeing storage.  Patch from Nalin Dahyabhai <nalin@redhat.com>.
+
 2000-10-23  Tom Yu  <tlyu@mit.edu>
 
        * secure.h: Change SESSION to refer to &cred.session instead, so
index d22bb71e59bc973c597cf75db4fbfa514b99d250..3ef5e8d2816cd4ab8479678c3f96e1b23dc9476b 100644 (file)
@@ -1854,6 +1854,7 @@ static int globulize(cpp)
        char **cpp;
 {
        char **globbed;
+       char **globbed1;
 
        if (!doglob)
                return (1);
@@ -1867,10 +1868,11 @@ static int globulize(cpp)
                return (0);
        }
        if (globbed) {
-               *cpp = *globbed++;
+               globbed1 = globbed;
+               *cpp = *globbed1++;
                /* don't waste too much memory */
                if (*globbed) {
-                       blkfree(globbed);
+                       blkfree(globbed1);
                        free((char *)globbed);
                }
        }