- Remove unnecessary function (isdigit)
* it is valid function when the param is char but used int param
- Add memory free when return error.
Change-Id: I1bbecc7e88f8973340299b8393736e6fd24f1587
Signed-off-by: jake <jaehong2.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17609
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-#include <ctype.h>
#include "NSProviderInterface.h"
#include "NSCommon.h"
printf("input : ");
- if(scanf("%d", &num) > 0 && isdigit(num) == 0)
+ if(scanf("%d", &num) > 0)
{
if(scanf("%c", &dummy) > 0)
{
if (!obj->data)
{
NS_LOG (ERROR, "Failed to CopyProvider");
+ NSOICFree(obj);
pthread_mutex_unlock(mutex);
return NS_ERROR;