We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c4935b commit 85411cfCopy full SHA for 85411cf
tnt_main.c
@@ -180,10 +180,11 @@ static SecMap* copy_for_writing ( SecMap* dist_sm )
180
|| dist_sm == &sm_distinguished[1]
181
|| dist_sm == &sm_distinguished[2]);
182
183
- new_sm = VG_(am_shadow_alloc)(sizeof(SecMap));
184
- if (new_sm == NULL)
185
- VG_(out_of_memory_NORETURN)( "memcheck:allocate new SecMap",
186
- sizeof(SecMap) );
+ SysRes sres = VG_(am_shadow_alloc)(sizeof(SecMap));
+ if (sr_isError(sres))
+ VG_(out_of_memory_NORETURN)( "tnt_main:allocate new SecMap",
+ sizeof(SecMap), sr_Err(sres) );
187
+ new_sm = (void *)(Addr)sr_Res(sres);
188
VG_(memcpy)(new_sm, dist_sm, sizeof(SecMap));
189
update_SM_counts(dist_sm, new_sm);
190
return new_sm;
0 commit comments