Coverity #1321256, #1321259 fixed
[scilab.git] / scilab / modules / preferences / sci_gateway / cpp / sci_addModulePreferences.cpp
index 3e06d3a..7542c2b 100644 (file)
@@ -67,7 +67,10 @@ int sci_addModulePreferences(char * fname, void *pvApiCtx)
             return 0;
         }
 
-        getAllocatedSingleString(pvApiCtx, addr, array[i]);
+        if (getAllocatedSingleString(pvApiCtx, addr, array[i]))
+        {
+            return 0;
+        }
     }
 
     expTbxPath = expandPathVariable(const_cast<char *>(tbxPath));