- stt_h temp = (stt_h)g_malloc0(sizeof(struct stt_s));
- temp->handle = __client_generate_uid(getpid());
+ stt_h temp = (stt_h)calloc(1, sizeof(struct stt_s));
+ if (NULL == temp) {
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to allocate memory");
+ free(client);
+ return STT_ERROR_OUT_OF_MEMORY;
+ }
+ temp->handle = __client_generate_uid(getpid());