Fixed use allocation

This commit is contained in:
bwilliams committed 2020-10-06 13:27:00 +01:00
1 parent 2a80789f1d
commit 681ad1a533
1 file changed
+1 -1
+1 -1
View File
@@ -413,7 +413,7 @@ struct sconn_modb_use_t *allocUse(struct stored_conn_t *sconn, struct modb_t *mo
memset(ptr, 0, sizeof(struct sconn_modb_use_t)); memset(ptr, 0, sizeof(struct sconn_modb_use_t));
ptr->sconn = sconn; ptr->sconn = sconn;
if (strmemcpy(modb->name, modb->name_len, &ptr->modb_name, &ptr->modb_name_len) == 0) { if (strmemcpy(modb->name, modb->name_len, &ptr->modb_name, &ptr->modb_name_len) != 0) {
fprintf(stderr, "[%d]malloc: (%d) %s\n", __LINE__, errno, strerror(errno)); fprintf(stderr, "[%d]malloc: (%d) %s\n", __LINE__, errno, strerror(errno));
free(ptr); free(ptr);
return 0; return 0;