fixed Svace issues reported by Tizen Commercialization Team 33/89333/1
authorchanywa <cbible.kim@samsung.com>
Fri, 23 Sep 2016 04:11:04 +0000 (13:11 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 23 Sep 2016 06:27:02 +0000 (15:27 +0900)
Change-Id: If7b7ab8e7f258e3fb63818c7eab14f01bdca3387
Signed-off-by: chanywa <cbible.kim@samsung.com>
inc/here_manager.h
inc/here_view_objects.h
maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_api.cpp
src/here_multirevgeocode.cpp
src/here_place.cpp
src/here_view.cpp
src/here_view_objects.cpp

index 0025e20d85afff19860a2a49b957e499603214aa..a7cc2ef0767d2f123cb253287367f2bd18f333f1 100644 (file)
@@ -58,7 +58,7 @@ public:
         *This is the default destructor for Geocoder.
         */
 
-       virtual ~HereManager();
+       ~HereManager();
 
        enum HereSvcType {
                HERE_SVC_GEOCODE,
index b2c29dc60b82e8130d2616e7644cf5852b84dc55..4e56e1cf920670a07fafda4363b0542e0d6a3ab6 100644 (file)
@@ -49,7 +49,7 @@ class HereViewObjects
 {
 public:
        HereViewObjects();
-       virtual ~HereViewObjects();
+       ~HereViewObjects();
 
        void set(GeoTiledMap *map, Evas *evas);
        // to remove // void update(UpdatedObjects objects);
index eaef268595862b34a7982c0f962fe90a9605f3c7..cfa3c834d862bd2f108d26227412f16e6a234645 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.8
+[Date]      23 Sep 2016
+[Title]     Fixed Svace issues
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.7
 [Date]      13 Sep 2016
 [Title]     Fixed to allow setting distance to 0 when searching places
index ede4f9997f2acae0a67570d83c625e59ea96c1b3..2fa38bb8427b049ff1a8295c5768f16531ab68b5 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.7
+Version:    0.3.8
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index 70875926780a94c121b3db891319b89cb74507d1..b3fbd9af9d3ba966bc195ed0f1825ab2525ac9d8 100644 (file)
@@ -680,9 +680,9 @@ int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCb
        HereView *vh = NULL, *ovh = NULL;
        vh = new HereView();
        if (!vh) return HERE_ERROR_OUT_OF_MEMORY;
-       maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh);
+       int error = maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh);
        maps_view_set_maps_plugin_view_handle(hView, vh);
-       if (ovh)
+       if (error == HERE_ERROR_NONE && ovh)
                delete ovh;
        return vh->init(hView, pCbFunc);
 }
@@ -847,17 +847,20 @@ static void _heremaps_consent_changed_cb(keynode_t *node EINA_UNUSED, void *user
 
 int HerePluginCheckUC(const char *provider, maps_service_request_user_consent_cb pCbFunc, void *user_data)
 {
-       heremaps_uc_cb_data *uc_data = (heremaps_uc_cb_data *)g_malloc0(sizeof(heremaps_uc_cb_data));
-       uc_data->provider = provider;
-       uc_data->pCbFunc = pCbFunc;
-       uc_data->user_data = user_data;
-
        int ret = HEREMAPS_UC_DBUS_ERROR_NONE;
        bool agreed = heremaps_check_agreement();
 
        if (agreed != TRUE) {
+               heremaps_uc_cb_data *uc_data = (heremaps_uc_cb_data *)g_malloc0(sizeof(heremaps_uc_cb_data));
+               if (!uc_data)
+                       return HERE_ERROR_OUT_OF_MEMORY;
+               uc_data->provider = provider;
+               uc_data->pCbFunc = pCbFunc;
+               uc_data->user_data = user_data;
+
                if (vconf_notify_key_changed(VCONFKEY_LOCATION_HEREMAPS_CONSENT, _heremaps_consent_changed_cb, uc_data) < 0) {
                        MAPS_LOGD("Unable to register a vconf changed cb to VCONFKEY_LOCATION_HEREMAPS_CONSENT");
+                       g_free(uc_data);
                        return HERE_ERROR_SERVICE_NOT_AVAILABLE;
                }
                MAPS_LOGD("heremaps_uc_dbus_launch_receiver is called");
index 2bc9ddaba81b2d41dc0b8e1cc89eaf31e4c6c678..057fe05c0be563ff2f2cc2017e8b14285ef84dfc 100644 (file)
@@ -58,7 +58,7 @@ static bool geocoder_coordinates_cb(int index, maps_coordinates_h coordinates, v
        hereCoord = GeoCoordinates(dLatitude, dLongitude);
 
        if (!HereUtils::IsValid(hereCoord))
-               return HERE_ERROR_INVALID_PARAMETER;
+               return false;
 
        GeoCoordinateList *pList =(GeoCoordinateList *) user_data;
        pList->push_back(hereCoord);
index 2bca429ad8e15976049f4988010436cc50aa9414..f9ef2b4de672f6c3df8c94efa87b91a07b4e5099 100644 (file)
@@ -555,6 +555,7 @@ void HerePlace::OnPlaceDetailsReply(const PlaceDetailsReply &Reply)
        /* Finding maps_place_h which is already pending since DiscoverReply */
        PlaceList::iterator it;
        for (it = m_PlaceList.begin(); it != m_PlaceList.end(); it++) {
+               placeId = NULL;
                if (maps_place_get_id(*it, &placeId) == MAPS_ERROR_NONE) {
                        placeIdLen = strlen(placeId);
                        if(!herePlace.GetPlaceId().compare(0, placeIdLen, placeId)) {
index acf284bd46fc8c3c473a596f5f66fdac00e6407f..33c7ee718639b8783fd67f7869f6dbc1ff2c2e3c 100644 (file)
@@ -206,9 +206,10 @@ here_error_e HereView::close(maps_view_h view)
                if (__sfc && __ctx)
                        evas_gl_make_current(__gl, __sfc, __ctx);
 
-               if (__sfc)
+               if (__sfc) {
                        evas_object_image_native_surface_set(__img, NULL);
                        evas_gl_surface_destroy(__gl, __sfc);
+               }
 
                if (__ctx)
                        evas_gl_context_destroy(__gl, __ctx);
index b41eace320d386a81f4af32f6e004ffc16c8c98b..9be5153ed1cdba48d905ca30a71139f7b03ba052 100644 (file)
@@ -29,6 +29,8 @@ HERE_PLUGIN_BEGIN_NAMESPACE
 
 HereViewObjects::HereViewObjects()
 {
+       __map = NULL;
+       __evas = NULL;
        pthread_mutex_init(&__mutex, NULL);
 }