Browse Source

Merge pull request #14495 from jakesmith/hpcc-24693-for7.8

HPCC-24693 Fix leak when super already exists

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 years ago
parent
commit
d9876fb055
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dali/base/dadfs.cpp

+ 2 - 2
dali/base/dadfs.cpp

@@ -8330,11 +8330,11 @@ IDistributedSuperFile *CDistributedFileDirectory::createSuperFile(const char *_l
     else
         localtrans.setown(new CDistributedFileTransaction(user));
 
-    IDistributedSuperFile *sfile = localtrans->lookupSuperFile(logicalname.get());
+    Owned<IDistributedSuperFile> sfile = localtrans->lookupSuperFile(logicalname.get());
     if (sfile)
     {
         if (ifdoesnotexist)
-            return sfile;
+            return sfile.getClear();
         else
             throw MakeStringException(-1,"createSuperFile: SuperFile %s already exists",logicalname.get());
     }