windows-bpluss-memleak-20080605
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 6 Jun 2008 00:22:03 +0000 (00:22 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 6 Jun 2008 00:22:03 +0000 (00:22 +0000)
LICENSE MIT

when deleting entries from a directory for items with non-8.3 names
memory for the longname field would be leaked.  don't do that.

src/WINNT/afsd/cm_btree.c

index 1b262c7..e70fdb3 100644 (file)
@@ -1345,6 +1345,8 @@ putFreeNode(Tree *B, Nptr node)
     if (isdata(node)) {
         if ( getdatakey(node).name )
             free(getdatakey(node).name);
+       if ( getdatavalue(node).longname )
+           free(getdatavalue(node).longname);
     } else {    /* data node */
         for ( i=1; i<=getfanout(B); i++ ) {
             if (getkey(node, i).name)