Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO"
am: f7d14b643b

Change-Id: I9c5ecaa30d4b08aa1eb327375c562dff6f78263e
Cr-Mirrored-From: https://chromium.googlesource.com/aosp/platform/system/core
Cr-Mirrored-Commit: 53a13e5705b4692c5e13b3ed8eb56931599e1fef
diff --git a/sync.c b/sync.c
index e657658..6b187fa 100644
--- a/sync.c
+++ b/sync.c
@@ -217,6 +217,8 @@
                   local_info.num_fences * sizeof(struct sync_fence_info));
     if (!info)
         return NULL;
+
+    info->num_fences = local_info.num_fences;
     info->sync_fence_info = (__u64)(uintptr_t)(info + 1);
 
     err = ioctl(fd, SYNC_IOC_FILE_INFO, info);