From: regrain Date: Fri, 21 Oct 2005 10:48:16 +0000 (+0000) Subject: * Fix bug... sorry, too quick commit when correcting memory leaks X-Git-Tag: OpenJPEG.Version1.2~267 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6c97d504aaac1aa41e9ad2b840863f5229c7515e;p=gdcm.git * Fix bug... sorry, too quick commit when correcting memory leaks -- BeNours --- diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index 7cf04812..b3cfe401 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2005/10/21 10:29:51 $ - Version: $Revision: 1.63 $ + Date: $Date: 2005/10/21 10:48:16 $ + Version: $Revision: 1.64 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -536,6 +536,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem, { goodEntry = NULL; } + dictEntry->Unregister(); } // Create a new virtual DictEntry if necessary @@ -555,7 +556,6 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem, { goodEntry->Register(); } - dictEntry->Unregister(); return goodEntry; }