]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/guid_to_name.c
Attempt to fix bat seg faults
[bacula/bacula] / bacula / src / lib / guid_to_name.c
index e77cd4f6771c55a99dd51c3d9e7e323ec7b7d887..e407c2247d139b8f38c23d7fddfdb5f79dbd88ca 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -147,6 +147,7 @@ char *guid_list::uid_to_name(uid_t uid, char *name, int maxlen)
       }
       fitem = (guitem *)uid_list->binary_insert(item, uid_compare);
       if (fitem != item) {               /* item already there this shouldn't happen */
+         free(item->name);
          free(item);
          item = fitem;   
       }
@@ -172,6 +173,7 @@ char *guid_list::gid_to_name(gid_t gid, char *name, int maxlen)
       }
       fitem = (guitem *)gid_list->binary_insert(item, gid_compare);
       if (fitem != item) {               /* item already there this shouldn't happen */
+         free(item->name);
          free(item);
          item = fitem;   
       }