478f9fe57277877ef7ef8e445a312ec9788a1b48 hiram Wed Jul 2 22:26:33 2025 -0700 the check for the successful hAllocConn will never get there as it will crash with the attempted connection refs #36030 diff --git src/hg/lib/asmEquivalent.c src/hg/lib/asmEquivalent.c index 7942c2c26b8..22884ab9e6b 100644 --- src/hg/lib/asmEquivalent.c +++ src/hg/lib/asmEquivalent.c @@ -257,31 +257,31 @@ char *asmEquivalentUcscToNCBI(char *ucscName, char *authority) /* check if there is an "authority" equivalent to this UCSC assembly name. * where 'authority' in this case is either 'refseq' or 'genbank' * No checking of sequence match counts in this first implementation, * therefore, could be a fuzzy match, and since it is returning only the * first one, it might not be the best match. Could add more specifics * later to get better match. */ { char *ret = NULL; if (ucscName == NULL) return ret; -struct sqlConnection *conn = hAllocConn("hgFixed"); +struct sqlConnection *conn = hAllocConnMaybe("hgFixed"); if (!conn) return ret; if (!sqlTableExists(conn, "asmEquivalent")) { hFreeConn(&conn); return ret; } char buffer[4096]; sqlSafef(buffer, sizeof buffer, "SELECT destination FROM asmEquivalent WHERE sourceAuthority='ucsc' AND destinationAuthority='%s' AND source='%s' LIMIT 1", authority, ucscName); char *sqlAnswer = sqlQuickString(conn, buffer); hFreeConn(&conn);