- Timestamp:
- Sep 4, 2018 2:16:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5872 r5875 270 270 pj_bool_t check_str) 271 271 { 272 pjsua_srtp_opt backup_dst; 273 274 if (check_str) pj_memcpy(&backup_dst, dst, sizeof(*dst)); 272 275 pj_memcpy(dst, src, sizeof(*src)); 276 273 277 if (pool) { 274 278 unsigned i; … … 279 283 { 280 284 pj_strdup(pool, &dst->crypto[i].key, &src->crypto[i].key); 285 } else { 286 /* If strings are identical, use the old string to 287 * avoid wasting memory. 288 */ 289 dst->crypto[i].key = backup_dst.crypto[i].key; 281 290 } 282 291 if (!check_str || … … 284 293 { 285 294 pj_strdup(pool, &dst->crypto[i].name, &src->crypto[i].name); 295 } else { 296 /* If strings are identical, use the old string to 297 * avoid wasting memory. 298 */ 299 dst->crypto[i].name = backup_dst.crypto[i].name; 286 300 } 287 301 }
Note: See TracChangeset
for help on using the changeset viewer.