[debugger] remove extraneous ErrorCode declaration (mono/mono#16862)
authorRyan Lucia <rylucia@microsoft.com>
Mon, 16 Sep 2019 21:14:42 +0000 (17:14 -0400)
committerZoltan Varga <vargaz@gmail.com>
Mon, 16 Sep 2019 21:14:42 +0000 (17:14 -0400)
With the single point of exit, this means the main ErrorCode isn't being written to and uninitialized memory is returned.

Commit migrated from https://github.com/mono/mono/commit/a23da4b8b33aa6929e2f82303d5a390b0cc5c422

src/mono/mono/mini/debugger-agent.c

index e9bbb90..a00efe7 100644 (file)
@@ -8128,7 +8128,6 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
 
                if (command == CMD_TYPE_GET_VALUES_2) {
                        int objid = decode_objid (p, &p, end);
-                       ErrorCode err;
 
                        err = get_object (objid, (MonoObject**)&thread_obj);
                        if (err != ERR_NONE)