Changeset: 921962836a0a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/921962836a0a
Modified Files:
        gdk/gdk_atoms.c
Branch: resource_management
Log Message:

Use allocator.


diffs (24 lines):

diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1494,8 +1494,7 @@ INET6fromString(allocator *ma, const cha
        const char *s = svalue;
 
        if (*len < 16 || *retval == NULL) {
-               GDKfree(*retval);
-               if ((*retval = GDKmalloc(16)) == NULL)
+               if ((*retval = ma_alloc(ma, 16)) == NULL)
                        return -1;
                *len = 16;
        }
@@ -1675,9 +1674,7 @@ INET6toString(allocator *ma, str *retval
        (void) external;
        /* max size: strlen("1234:1234:1234:1234:1234:1234:1234:1234")+1 */
        if (*len < 40 || *retval == NULL) {
-               if (*retval)
-                       GDKfree(*retval);
-               if ((*retval = GDKmalloc(40)) == NULL)
+               if ((*retval = ma_alloc(ma, 40)) == NULL)
                        return -1;
                *len = 40;
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to