[GTK] Add a GKeyFile especialization to GOwnPtr
[WebKit-https.git] / Source / JavaScriptCore / wtf / gobject / GOwnPtr.cpp
index 4158689c663a73490676b193bb96686632cfd6c0..c727956cea3132813169e12a7db8fbf9f14c4039 100644 (file)
@@ -55,6 +55,12 @@ template <> void freeOwnedGPtr<GTimer>(GTimer* ptr)
         g_timer_destroy(ptr);
 }
 
+template <> void freeOwnedGPtr<GKeyFile>(GKeyFile* ptr)
+{
+    if (ptr)
+        g_key_file_free(ptr);
+}
+
 } // namespace WTF
 
 #endif // ENABLE(GLIB_SUPPORT)