Bug 1251298 - Null out |*idp| when necessary in DoInterfaceDescriptor. r=khuey.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 26 Feb 2016 10:15:16 +1100
changeset 321984 3322ea94dacb87e3934c1c0d0fe560295fcdf9c4
parent 321983 8901dd8c722185016e3ccc2c4056dedfbf6a033a
child 321985 34e6eea401e35f3b25ee3181b4219b56aca968e6
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1251298
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1251298 - Null out |*idp| when necessary in DoInterfaceDescriptor. r=khuey.
xpcom/typelib/xpt/xpt_struct.cpp
--- a/xpcom/typelib/xpt/xpt_struct.cpp
+++ b/xpcom/typelib/xpt/xpt_struct.cpp
@@ -197,16 +197,17 @@ DoInterfaceDescriptor(XPTArena *arena, X
     *idp = id;
 
     if (!XPT_MakeCursor(outer->state, XPT_DATA, id_sz, cursor))
         return PR_FALSE;
 
     if (!XPT_Do32(outer, &cursor->offset))
         return PR_FALSE;
     if (!cursor->offset) {
+        *idp = NULL;
         return PR_TRUE;
     }
     if(!XPT_Do16(cursor, &id->parent_interface) ||
        !XPT_Do16(cursor, &id->num_methods)) {
         return PR_FALSE;
     }
 
     if (id->num_methods) {