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 0025e20..a7cc2ef 100644 (file)
@@ -58,7 +58,7 @@ public:
         *This is the default destructor for Geocoder.
         */
 
-       virtual ~HereManager();
+       ~HereManager();
 
        enum HereSvcType {
                HERE_SVC_GEOCODE,
index b2c29dc..4e56e1c 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 eaef268..cfa3c83 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 ede4f99..2fa38bb 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 7087592..b3fbd9a 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 2bc9dda..057fe05 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 2bca429..f9ef2b4 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 acf284b..33c7ee7 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 b41eace..9be5153 100644 (file)
@@ -29,6 +29,8 @@ HERE_PLUGIN_BEGIN_NAMESPACE
 
 HereViewObjects::HereViewObjects()
 {
+       __map = NULL;
+       __evas = NULL;
        pthread_mutex_init(&__mutex, NULL);
 }