[gjs] arg: Free float and double arrays



commit 54f8c27271925571d29ae936679b4859749cf885
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Oct 10 17:18:57 2016 -0700

    arg: Free float and double arrays
    
    Compiling with -Wswitch revealed that these are not freed correctly.
    They can be freed just like the other arrays of primitive types.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772790

 gi/arg.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 8a9fb47..88955eb 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -3109,6 +3109,8 @@ gjs_g_arg_release_internal(JSContext  *context,
             case GI_TYPE_TAG_INT8:
             case GI_TYPE_TAG_INT16:
             case GI_TYPE_TAG_INT32:
+            case GI_TYPE_TAG_FLOAT:
+            case GI_TYPE_TAG_DOUBLE:
             case GI_TYPE_TAG_GTYPE:
                 g_free (arg->v_pointer);
                 break;
@@ -3181,6 +3183,8 @@ gjs_g_arg_release_internal(JSContext  *context,
             case GI_TYPE_TAG_INT16:
             case GI_TYPE_TAG_INT32:
             case GI_TYPE_TAG_INT64:
+            case GI_TYPE_TAG_FLOAT:
+            case GI_TYPE_TAG_DOUBLE:
             case GI_TYPE_TAG_GTYPE:
                 g_array_free((GArray*) arg->v_pointer, true);
                 break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]