Просмотр исходного кода

code analysis found a memset overwrote a data structure.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1040 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 20 лет назад
Родитель
Сommit
c3ad9d1330
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      exec/totemrrp.c

+ 1 - 1
exec/totemrrp.c

@@ -870,7 +870,7 @@ void *active_instance_initialize (
 	if (instance == 0) {
 	if (instance == 0) {
 		goto error_exit;
 		goto error_exit;
 	}
 	}
-	memset (instance, 0, sizeof (struct passive_instance));
+	memset (instance, 0, sizeof (struct active_instance));
 
 
 	instance->faulty = malloc (sizeof (int) * interface_count);
 	instance->faulty = malloc (sizeof (int) * interface_count);
 	if (instance->faulty == 0) {
 	if (instance->faulty == 0) {