On 10/03/2012 02:46 PM, Corey Bryant wrote:


On 06/04/2012 03:37 PM, Stefan Berger wrote:
@@ -201,6 +201,10 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
          res->path = g_strdup(drv->path);
          res->has_path = true;
      }
+    if (drv->tpm_fd != NULL && *drv->tpm_fd >= 0) {
+        res->fd = *drv->tpm_fd;
+        res->has_fd = true;
+    }

Is an else path needed to set res->has_fd = false if there's no tpm_fd?


res is allocated using g_new0, so all fields are set to 0. With that has_fd is also set to false.

Regards,
   Stefan


Reply via email to