Commit fe3db7bb authored by Ian Goldberg's avatar Ian Goldberg
Browse files

Change two malloc+strcpy into strdup

Just to make it a bit cleaner
parent 85abd247
......@@ -207,10 +207,8 @@ gcry_error_t otrl_instag_generate_FILEp(OtrlUserState us, FILE *instf,
if (!accountname || !protocol) return gcry_error(GPG_ERR_NO_ERROR);
p = (OtrlInsTag *)malloc(sizeof(OtrlInsTag));
p->accountname = malloc(strlen(accountname)+1);
p->protocol = malloc(strlen(protocol)+1);
strcpy(p->accountname, accountname);
strcpy(p->protocol, protocol);
p->accountname = strdup(accountname);
p->protocol = strdup(protocol);
p->instag = otrl_instag_get_new();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment